Bug 1447982 - Move mic source allocation logging so it actually covers allocations. r?padenot
MozReview-Commit-ID: Ipq5vqCfvgi
--- 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));