diff options
author | Matthew Gregan <[email protected]> | 2016-12-21 18:24:01 +1300 |
---|---|---|
committer | Matthew Gregan <[email protected]> | 2016-12-21 18:24:01 +1300 |
commit | 0811eb44bc585dd4becaa570907323d537c6a1cf (patch) | |
tree | 8e4654bf8c552e8682c069a63505a41fc4c2f81a | |
parent | a900d6e511c3286956c38ca60162790ca6e8e18d (diff) | |
download | cubeb-0811eb44bc585dd4becaa570907323d537c6a1cf.tar.gz cubeb-0811eb44bc585dd4becaa570907323d537c6a1cf.zip |
Define cubeb_layout_map in cubeb_mixer.cpp rather than cubeb-internal.h.
-rw-r--r-- | src/cubeb-internal.h | 22 | ||||
-rw-r--r-- | src/cubeb_mixer.cpp | 22 | ||||
-rw-r--r-- | src/cubeb_mixer.h | 6 |
3 files changed, 26 insertions, 24 deletions
diff --git a/src/cubeb-internal.h b/src/cubeb-internal.h index 083a02a..962e956 100644 --- a/src/cubeb-internal.h +++ b/src/cubeb-internal.h @@ -41,27 +41,7 @@ typedef struct { cubeb_channel_layout const layout; } cubeb_layout_map; -static cubeb_layout_map const CUBEB_CHANNEL_LAYOUT_MAPS[CUBEB_LAYOUT_MAX] = { - { "undefined", 0, CUBEB_LAYOUT_UNDEFINED }, - { "dual mono", 2, CUBEB_LAYOUT_DUAL_MONO }, - { "dual mono lfe", 3, CUBEB_LAYOUT_DUAL_MONO_LFE }, - { "mono", 1, CUBEB_LAYOUT_MONO }, - { "mono lfe", 2, CUBEB_LAYOUT_MONO_LFE }, - { "stereo", 2, CUBEB_LAYOUT_STEREO }, - { "stereo lfe", 3, CUBEB_LAYOUT_STEREO_LFE }, - { "3f", 3, CUBEB_LAYOUT_3F }, - { "3f lfe", 4, CUBEB_LAYOUT_3F_LFE }, - { "2f1", 3, CUBEB_LAYOUT_2F1 }, - { "2f1 lfe", 4, CUBEB_LAYOUT_2F1_LFE }, - { "3f1", 4, CUBEB_LAYOUT_3F1 }, - { "3f1 lfe", 5, CUBEB_LAYOUT_3F1_LFE }, - { "2f2", 4, CUBEB_LAYOUT_2F2 }, - { "2f2 lfe", 5, CUBEB_LAYOUT_2F2_LFE }, - { "3f2", 5, CUBEB_LAYOUT_3F2 }, - { "3f2 lfe", 6, CUBEB_LAYOUT_3F2_LFE }, - { "3f3r lfe", 7, CUBEB_LAYOUT_3F3R_LFE }, - { "3f4 lfe", 8, CUBEB_LAYOUT_3F4_LFE } -}; +extern cubeb_layout_map const CUBEB_CHANNEL_LAYOUT_MAPS[CUBEB_LAYOUT_MAX]; struct cubeb_ops { int (* init)(cubeb ** context, char const * context_name); diff --git a/src/cubeb_mixer.cpp b/src/cubeb_mixer.cpp index 241698a..ec0f535 100644 --- a/src/cubeb_mixer.cpp +++ b/src/cubeb_mixer.cpp @@ -9,6 +9,28 @@ #include "cubeb-internal.h" #include "cubeb_mixer.h" +cubeb_layout_map const CUBEB_CHANNEL_LAYOUT_MAPS[CUBEB_LAYOUT_MAX] = { + { "undefined", 0, CUBEB_LAYOUT_UNDEFINED }, + { "dual mono", 2, CUBEB_LAYOUT_DUAL_MONO }, + { "dual mono lfe", 3, CUBEB_LAYOUT_DUAL_MONO_LFE }, + { "mono", 1, CUBEB_LAYOUT_MONO }, + { "mono lfe", 2, CUBEB_LAYOUT_MONO_LFE }, + { "stereo", 2, CUBEB_LAYOUT_STEREO }, + { "stereo lfe", 3, CUBEB_LAYOUT_STEREO_LFE }, + { "3f", 3, CUBEB_LAYOUT_3F }, + { "3f lfe", 4, CUBEB_LAYOUT_3F_LFE }, + { "2f1", 3, CUBEB_LAYOUT_2F1 }, + { "2f1 lfe", 4, CUBEB_LAYOUT_2F1_LFE }, + { "3f1", 4, CUBEB_LAYOUT_3F1 }, + { "3f1 lfe", 5, CUBEB_LAYOUT_3F1_LFE }, + { "2f2", 4, CUBEB_LAYOUT_2F2 }, + { "2f2 lfe", 5, CUBEB_LAYOUT_2F2_LFE }, + { "3f2", 5, CUBEB_LAYOUT_3F2 }, + { "3f2 lfe", 6, CUBEB_LAYOUT_3F2_LFE }, + { "3f3r lfe", 7, CUBEB_LAYOUT_3F3R_LFE }, + { "3f4 lfe", 8, CUBEB_LAYOUT_3F4_LFE } +}; + static int const CHANNEL_ORDER_TO_INDEX[CUBEB_LAYOUT_MAX][CHANNEL_MAX] = { // M | L | R | C | LS | RS | RLS | RC | RRS | LFE { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, // UNSUPPORTED diff --git a/src/cubeb_mixer.h b/src/cubeb_mixer.h index dc90410..d1d0e84 100644 --- a/src/cubeb_mixer.h +++ b/src/cubeb_mixer.h @@ -5,8 +5,8 @@ * accompanying file LICENSE for details. */ -#ifndef CUBEB_MIXING -#define CUBEB_MIXING +#ifndef CUBEB_MIXER +#define CUBEB_MIXER #include "cubeb/cubeb.h" // for cubeb_channel_layout ,CUBEB_CHANNEL_LAYOUT_MAPS and cubeb_stream_params. @@ -66,4 +66,4 @@ void cubeb_upmix_float(float * const in, long inframes, float * out, } #endif -#endif // CUBEB_MIXING +#endif // CUBEB_MIXER |