diff options
author | Chun-Min Chang <[email protected]> | 2017-02-07 18:45:49 +0800 |
---|---|---|
committer | Paul Adenot <[email protected]> | 2017-02-07 11:45:49 +0100 |
commit | f4edfb8eea920887713325e44773f3a2d959860c (patch) | |
tree | f1c14f658ba472c8e377993f628f0c17bd917837 /src/cubeb_mixer.h | |
parent | afad5aaee8fccd355d9222331230d852537e1618 (diff) | |
download | cubeb-f4edfb8eea920887713325e44773f3a2d959860c.tar.gz cubeb-f4edfb8eea920887713325e44773f3a2d959860c.zip |
Multiple channel support on OS X (#212)
* fix typo
* Add cubeb_channel_map_to_layout
* Implement audiounit_get_preferred_channel_layout
* Implement audiounit_layout_init
* Create auto_channel_layout to replace raw operation of AudioChannelLayout
* Apply cubeb_channel_map_to_layout in cubeb_pulse.c
* Use enum instead of bool to indicate input or output
* Show input/output, preferred or not in error message for channel layout
* Replace Boolean writable by nullptr
* Null the raw pointer(layout) after freeing it
* Use fieldOffset to calculate size of AudioChannelLayout
* Return CUBEB_ERROR when preferred layout is non-SMPTE format
* Check layout is undefined when cubeb_get_preferred_channel_layout returns ERROR
Diffstat (limited to 'src/cubeb_mixer.h')
-rw-r--r-- | src/cubeb_mixer.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cubeb_mixer.h b/src/cubeb_mixer.h index 1527483..466b597 100644 --- a/src/cubeb_mixer.h +++ b/src/cubeb_mixer.h @@ -52,6 +52,13 @@ static cubeb_channel const CHANNEL_INDEX_TO_ORDER[CUBEB_LAYOUT_MAX][CHANNEL_MAX] { CHANNEL_LEFT, CHANNEL_RIGHT, CHANNEL_CENTER, CHANNEL_LFE, CHANNEL_RLS, CHANNEL_RRS, CHANNEL_LS, CHANNEL_RS } // 3F4_LFE }; +typedef struct { + unsigned int channels; + cubeb_channel map[CHANNEL_MAX]; +} cubeb_channel_map; + +cubeb_channel_layout cubeb_channel_map_to_layout(cubeb_channel_map const * channel_map); + bool cubeb_should_upmix(cubeb_stream_params const * stream, cubeb_stream_params const * mixer); bool cubeb_should_downmix(cubeb_stream_params const * stream, cubeb_stream_params const * mixer); |