aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cubeb_mixer.cpp
diff options
context:
space:
mode:
authorChunMinChang <[email protected]>2017-03-15 13:19:25 +0100
committerAlex Chronopoulos <[email protected]>2017-03-15 13:48:03 +0100
commit4ab4577699fb42931f0fbd39826fa085dace4589 (patch)
treead018ffd592348bfaf306f28c4d26c0d768c6ccd /src/cubeb_mixer.cpp
parent9238299442f03e459feb8f77461931799192326d (diff)
downloadcubeb-4ab4577699fb42931f0fbd39826fa085dace4589.tar.gz
cubeb-4ab4577699fb42931f0fbd39826fa085dace4589.zip
audiounit: Downmix audio on OSX (#234)
* Downmix audio data on OSX * Fix weird commen indent and modify code for mix_remap * Add mixing interface to wrap the downmixing beyond data type * Fix coding style issue * Allow same buffer for input and output of downmix_3f2 * Special version of downmix_3f2 for OSX * Update mixer functions for using same buffer for input/output * Replace function pointer with std::function for better readability * Merge two downmix_3f2 into one
Diffstat (limited to 'src/cubeb_mixer.cpp')
-rw-r--r--src/cubeb_mixer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cubeb_mixer.cpp b/src/cubeb_mixer.cpp
index 8a0bb32..2958133 100644
--- a/src/cubeb_mixer.cpp
+++ b/src/cubeb_mixer.cpp
@@ -236,16 +236,16 @@ static float const DOWNMIX_MATRIX_3F2_LFE[SUPPORTED_LAYOUT_NUM][MAX_OUTPUT_CHANN
// ^ ^ ^ ^
// The data for these four channels will be dropped!
//
-// To keep all the information, we need to downmix the data before it's dropped
+// To keep all the information, we need to downmix the data before it's dropped.
// The figure below shows an example for downmixing from 3F2-LFE(Fig. 1)
-// to stereo(Fig. 3) on OSX.
+// to stereo(Fig. 3) on OSX, where the LO, R0, L1, R0 are same as above.
//
// Fig. 3:
// |<---------- 1 ---------->|<---------- 2 ---------->|
// +----+----+---+---+---+---+----+----+---+---+---+---+
// | L0 | R0 | x | x | x | x | L1 | R1 | x | x | x | x | ...
// +----+----+---+---+---+---+----+----+---+---+---+---+
-// |<-- gap -->| |<-- gap -->|
+// |<-- dummy -->| |<-- dummy -->|
template<typename T>
bool
downmix_3f2(T const * const in, unsigned long inframes, T * out, cubeb_channel_layout in_layout, cubeb_channel_layout out_layout)