Bug 1447982 - Move mic source allocation logging so it actually covers allocations. r=padenot
authorAndreas Pehrson <pehrsons@mozilla.com>
Mon, 26 Mar 2018 11:03:58 +0200
changeset 469108 1e59416d1a7715dd5e4a5032d1904a783abcf905
parent 469107 5ce4dd0d0ca5b075ac1008e505df64bbdfc76df5
child 469109 5180d718e5a550bcf3939cd335a5b47514f9429d
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1447982
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 1447982 - Move mic source allocation logging so it actually covers allocations. r=padenot MozReview-Commit-ID: Ipq5vqCfvgi
dom/media/webrtc/MediaEngineWebRTCAudio.cpp
--- a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
+++ b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
@@ -489,31 +489,31 @@ MediaEngineWebRTCMicrophoneSource::Updat
         uint32_t channelCount = 0;
         mAudioInput->GetChannelCount(channelCount);
         MOZ_ASSERT(channelCount > 0 && mLastPrefs.mChannels > 0);
         if (!stream->OpenNewAudioCallbackDriver(mListener)) {
           MOZ_LOG(GetMediaManagerLog(), LogLevel::Error, ("Could not open a new AudioCallbackDriver for input"));
           return NS_ERROR_FAILURE;
         }
       }
-
-      if (MOZ_LOG_TEST(GetMediaManagerLog(), LogLevel::Debug)) {
-        if (mAllocations.IsEmpty()) {
-          LOG(("Audio device %d reallocated", mCapIndex));
-        } else {
-          LOG(("Audio device %d allocated shared", mCapIndex));
-        }
-      }
       break;
 
     default:
       LOG(("Audio device %d in ignored state %d", mCapIndex, mState));
       break;
   }
 
+  if (MOZ_LOG_TEST(GetMediaManagerLog(), LogLevel::Debug)) {
+    if (mAllocations.IsEmpty()) {
+      LOG(("Audio device %d reallocated", mCapIndex));
+    } else {
+      LOG(("Audio device %d allocated shared", mCapIndex));
+    }
+  }
+
   if (sChannelsOpen > 0) {
     UpdateAGCSettingsIfNeeded(prefs.mAgcOn, static_cast<AgcModes>(prefs.mAgc));
     UpdateNSSettingsIfNeeded(prefs.mNoiseOn, static_cast<NsModes>(prefs.mNoise));
     UpdateAECSettingsIfNeeded(prefs.mAecOn, static_cast<EcModes>(prefs.mAec));
 
     webrtc::Config config;
     config.Set<webrtc::ExtendedFilter>(new webrtc::ExtendedFilter(mExtendedFilter));
     config.Set<webrtc::DelayAgnostic>(new webrtc::DelayAgnostic(mDelayAgnostic));