aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cubeb_mixer.h
diff options
context:
space:
mode:
authorChun-Min Chang <[email protected]>2017-05-02 06:18:09 -0500
committerMatthew Gregan <[email protected]>2017-05-02 23:18:09 +1200
commitd43753eb6f313f2301995ece343f3c141d29e450 (patch)
tree22ab78150132326eff42ae7336bf61263d570325 /src/cubeb_mixer.h
parentfe2398328fb78e5c72b3b15b63ef829dd395e177 (diff)
downloadcubeb-d43753eb6f313f2301995ece343f3c141d29e450.tar.gz
cubeb-d43753eb6f313f2301995ece343f3c141d29e450.zip
Use same mixer interface for wasapi and audiounit (#290)
* Rename mixing stuff to mixer in wasapi to align the name in audiounit * Use an identical mixer interface * Remove CUBEB_MIXER_DIRECTION_ALL * Fix the wrong assert * Use cubeb_sample_format as parameter type in cubeb_mixer_create and remove weird comment * Use explicit for cubeb_mixer_impl's constructor * Breakdown assertion in cubeb_downmix * Remove const for cubeb_mixer::mix
Diffstat (limited to 'src/cubeb_mixer.h')
-rw-r--r--src/cubeb_mixer.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/cubeb_mixer.h b/src/cubeb_mixer.h
index 9b6d8c7..2cb2d14 100644
--- a/src/cubeb_mixer.h
+++ b/src/cubeb_mixer.h
@@ -68,21 +68,19 @@ bool cubeb_should_downmix(cubeb_stream_params const * stream, cubeb_stream_param
bool cubeb_should_mix(cubeb_stream_params const * stream, cubeb_stream_params const * mixer);
-void cubeb_downmix_float(float * const in, long inframes, float * out,
- unsigned int in_channels, unsigned int out_channels,
- cubeb_channel_layout in_layout, cubeb_channel_layout out_layout);
-
-void cubeb_downmix_short(short * const in, long inframes, short * out,
- unsigned int in_channels, unsigned int out_channels,
- cubeb_channel_layout in_layout, cubeb_channel_layout out_layout);
-
-void cubeb_upmix_float(float * const in, long inframes, float * out,
- unsigned int in_channels, unsigned int out_channels);
-
-void cubeb_upmix_short(short * const in, long inframes, short * out,
- unsigned int in_channels, unsigned int out_channels);
-
-
+typedef enum {
+ CUBEB_MIXER_DIRECTION_DOWNMIX = 0x01,
+ CUBEB_MIXER_DIRECTION_UPMIX = 0x02,
+} cubeb_mixer_direction;
+
+typedef struct cubeb_mixer cubeb_mixer;
+cubeb_mixer * cubeb_mixer_create(cubeb_sample_format format,
+ unsigned char direction);
+void cubeb_mixer_destroy(cubeb_mixer * mixer);
+void cubeb_mixer_mix(cubeb_mixer * mixer,
+ void * input_buffer, long frames, void * output_buffer,
+ cubeb_stream_params const * stream_params,
+ cubeb_stream_params const * mixer_params);
#if defined(__cplusplus)
}