Bug 1432779 - P5. Remove no longer used variables. r=padenot
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 31 Jan 2018 19:25:25 +0100
changeset 409780 52a4fb079d6c5bfe87bfcc0fbff7ec57a4ecab8e
parent 409779 4e8af01f19c29b43c1f0606d1fac0d262c777b40
child 409781 d3d5dc721d4728f6d5425749aeda0b5489a6b0c3
push id101310
push userjyavenard@mozilla.com
push dateSat, 24 Mar 2018 10:08:45 +0000
treeherdermozilla-inbound@8d4c3cf648d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1432779
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1432779 - P5. Remove no longer used variables. r=padenot MozReview-Commit-ID: LqOuM1F0NC2
dom/media/CubebUtils.cpp
--- a/dom/media/CubebUtils.cpp
+++ b/dom/media/CubebUtils.cpp
@@ -34,35 +34,16 @@
 #define PREF_CUBEB_LATENCY_PLAYBACK "media.cubeb_latency_playback_ms"
 #define PREF_CUBEB_LATENCY_MSG "media.cubeb_latency_msg_frames"
 // Allows to get something non-default for the preferred sample-rate, to allow
 // troubleshooting in the field and testing.
 #define PREF_CUBEB_FORCE_SAMPLE_RATE "media.cubeb.force_sample_rate"
 #define PREF_CUBEB_LOGGING_LEVEL "media.cubeb.logging_level"
 #define PREF_CUBEB_SANDBOX "media.cubeb.sandbox"
 
-#define MASK_MONO       (AudioConfig::ChannelLayout::LMONO_MAP)
-#define MASK_MONO_LFE   (AudioConfig::ChannelLayout::LMONO_LFE_MAP)
-#define MASK_STEREO     (AudioConfig::ChannelLayout::LSTEREO_MAP)
-#define MASK_STEREO_LFE (AudioConfig::ChannelLayout::LSTEREO_LFE_MAP)
-#define MASK_3F         (AudioConfig::ChannelLayout::L3F_MAP)
-#define MASK_3F_LFE     (AudioConfig::ChannelLayout::L3F_LFE_MAP)
-#define MASK_2F1        (AudioConfig::ChannelLayout::L2F1_MAP)
-#define MASK_2F1_LFE    (AudioConfig::ChannelLayout::L2F1_LFE_MAP)
-#define MASK_3F1        (AudioConfig::ChannelLayout::L3F1_MAP)
-#define MASK_3F1_LFE    (AudioConfig::ChannelLayout::L3F1_LFE_MAP)
-#define MASK_2F2        (AudioConfig::ChannelLayout::L2F2_MAP)
-#define MASK_2F2_LFE    (AudioConfig::ChannelLayout::L2F2_LFE_MAP)
-#define MASK_QUAD       (AudioConfig::ChannelLayout::LQUAD_MAP)
-#define MASK_QUAD_LFE   (AudioConfig::ChannelLayout::LQUAD_MAP_LFE)
-#define MASK_3F2        (AudioConfig::ChannelLayout::L3F2_MAP)
-#define MASK_3F2_LFE    (AudioConfig::ChannelLayout::L3F2_LFE_MAP)
-#define MASK_3F3R_LFE   (AudioConfig::ChannelLayout::L3F3R_LFE_MAP)
-#define MASK_3F4_LFE    (AudioConfig::ChannelLayout::L3F4_LFE_MAP)
-
 #if (defined(XP_LINUX) && !defined(MOZ_WIDGET_ANDROID)) || defined(XP_MACOSX)
 #define MOZ_CUBEB_REMOTING
 #endif
 
 extern "C" {
 // These functions are provided by audioipc-server crate
 extern void* audioipc_server_start();
 extern mozilla::ipc::FileDescriptor::PlatformHandleType audioipc_server_new_client(void*);
@@ -159,44 +140,16 @@ const char* AUDIOSTREAM_BACKEND_ID_STR[]
 /* Index for failures to create an audio stream the first time. */
 const int CUBEB_BACKEND_INIT_FAILURE_FIRST =
   ArrayLength(AUDIOSTREAM_BACKEND_ID_STR);
 /* Index for failures to create an audio stream after the first time */
 const int CUBEB_BACKEND_INIT_FAILURE_OTHER = CUBEB_BACKEND_INIT_FAILURE_FIRST + 1;
 /* Index for an unknown backend. */
 const int CUBEB_BACKEND_UNKNOWN = CUBEB_BACKEND_INIT_FAILURE_FIRST + 2;
 
-typedef struct {
-  const char* name;
-  const unsigned int channels;
-  const uint32_t mask;
-} layoutInfo;
-
-const layoutInfo kLayoutInfos[CUBEB_LAYOUT_MAX] = {
-  { "undefined",      0, 0 },               // CUBEB_LAYOUT_UNDEFINED
-  { "mono",           1, MASK_MONO },       // CUBEB_LAYOUT_MONO
-  { "mono lfe",       2, MASK_MONO_LFE },   // CUBEB_LAYOUT_MONO_LFE
-  { "stereo",         2, MASK_STEREO },     // CUBEB_LAYOUT_STEREO
-  { "stereo lfe",     3, MASK_STEREO_LFE }, // CUBEB_LAYOUT_STEREO_LFE
-  { "3f",             3, MASK_3F },         // CUBEB_LAYOUT_3F
-  { "3f lfe",         4, MASK_3F_LFE },     // CUBEB_LAYOUT_3F_LFE
-  { "2f1",            3, MASK_2F1 },        // CUBEB_LAYOUT_2F1
-  { "2f1 lfe",        4, MASK_2F1_LFE },    // CUBEB_LAYOUT_2F1_LFE
-  { "3f1",            4, MASK_3F1 },        // CUBEB_LAYOUT_3F1
-  { "3f1 lfe",        5, MASK_3F1_LFE },    // CUBEB_LAYOUT_3F1_LFE
-  { "2f2",            4, MASK_2F2 },        // CUBEB_LAYOUT_2F2
-  { "2f2 lfe",        5, MASK_2F2_LFE },    // CUBEB_LAYOUT_2F2_LFE
-  { "quad",           4, MASK_QUAD },       // CUBEB_LAYOUT_QUAD
-  { "quad lfe",       5, MASK_QUAD_LFE },   // CUBEB_LAYOUT_QUAD_LFE
-  { "3f2",            5, MASK_3F2 },        // CUBEB_LAYOUT_3F2
-  { "3f2 lfe",        6, MASK_3F2_LFE },    // CUBEB_LAYOUT_3F2_LFE
-  { "3f3r lfe",       7, MASK_3F3R_LFE },   // CUBEB_LAYOUT_3F3R_LFE
-  { "3f4 lfe",        8, MASK_3F4_LFE }     // CUBEB_LAYOUT_3F4_LFE
-};
-
 // Prefered samplerate, in Hz (characteristic of the hardware, mixer, platform,
 // and API used).
 //
 // sMutex protects *initialization* of this, which must be performed from each
 // thread before fetching, after which it is safe to fetch without holding the
 // mutex because it is only written once per process execution (by the first
 // initialization to complete).  Since the init must have been called on a
 // given thread before fetching the value, it's guaranteed (via the mutex) that