Bug 1549699 - Don't use communication devices by default on Windows. r=achronop
authorPaul Adenot <paul@paul.cx>
Tue, 07 May 2019 15:19:32 +0000
changeset 472908 19907c1f0f10b740510ae828b6db2d1891e9d7a8
parent 472907 90cb2313723f7106ae2521ff42c14a631d65b62f
child 472909 2996e082682ca6418ea92337eb2d12b6b86fd95b
push id35983
push userncsoregi@mozilla.com
push dateWed, 08 May 2019 03:38:51 +0000
treeherdermozilla-central@0e9e744accd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersachronop
bugs1549699
milestone68.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 1549699 - Don't use communication devices by default on Windows. r=achronop Differential Revision: https://phabricator.services.mozilla.com/D30205
dom/media/GraphDriver.cpp
--- a/dom/media/GraphDriver.cpp
+++ b/dom/media/GraphDriver.cpp
@@ -612,19 +612,21 @@ bool AudioCallbackDriver::Init() {
 
   mBuffer = AudioCallbackBufferWrapper<AudioDataValue>(mOutputChannels);
   mScratchBuffer =
       SpillBuffer<AudioDataValue, WEBAUDIO_BLOCK_SIZE * 2>(mOutputChannels);
 
   output.channels = mOutputChannels;
   output.layout = CUBEB_LAYOUT_UNDEFINED;
   output.prefs = CubebUtils::GetDefaultStreamPrefs();
+#if !defined(XP_WIN)
   if (mInputDevicePreference == CUBEB_DEVICE_PREF_VOICE) {
     output.prefs |= static_cast<cubeb_stream_prefs>(CUBEB_STREAM_PREF_VOICE);
   }
+#endif
 
   uint32_t latency_frames = CubebUtils::GetCubebMSGLatencyInFrames(&output);
 
   // Macbook and MacBook air don't have enough CPU to run very low latency
   // MediaStreamGraphs, cap the minimal latency to 512 frames int this case.
   if (IsMacbookOrMacbookAir()) {
     latency_frames = std::max((uint32_t)512, latency_frames);
   }