Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Unified Diff: webrtc/modules/audio_device/ios/audio_device_ios.mm

Issue 2780263002: Add logging around audio session interruptions (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_device/ios/audio_device_ios.mm
diff --git a/webrtc/modules/audio_device/ios/audio_device_ios.mm b/webrtc/modules/audio_device/ios/audio_device_ios.mm
index dde42129e5c9380475c6e820131ebf38e3b6741b..721ba77aaaafcf74236feeb84dc9bc2846341af9 100644
--- a/webrtc/modules/audio_device/ios/audio_device_ios.mm
+++ b/webrtc/modules/audio_device/ios/audio_device_ios.mm
@@ -326,11 +326,13 @@ int AudioDeviceIOS::GetRecordAudioParameters(AudioParameters* params) const {
void AudioDeviceIOS::OnInterruptionBegin() {
RTC_DCHECK(thread_);
+ LOGI() << "OnInterruptionBegin";
thread_->Post(RTC_FROM_HERE, this, kMessageTypeInterruptionBegin);
}
void AudioDeviceIOS::OnInterruptionEnd() {
RTC_DCHECK(thread_);
+ LOGI() << "OnInterruptionEnd";
thread_->Post(RTC_FROM_HERE, this, kMessageTypeInterruptionEnd);
}
@@ -468,6 +470,7 @@ void AudioDeviceIOS::OnMessage(rtc::Message *msg) {
void AudioDeviceIOS::HandleInterruptionBegin() {
RTC_DCHECK(thread_checker_.CalledOnValidThread());
+ RTCLog(@"Handling interruption begin.");
if (audio_unit_ &&
audio_unit_->GetState() == VoiceProcessingAudioUnit::kStarted) {
RTCLog(@"Stopping the audio unit due to interruption begin.");
@@ -481,8 +484,9 @@ void AudioDeviceIOS::HandleInterruptionBegin() {
void AudioDeviceIOS::HandleInterruptionEnd() {
RTC_DCHECK(thread_checker_.CalledOnValidThread());
+ RTCLog(@"Interruption ended. IsInterrupted=%d. Updating audio unit state.",
tkchin_webrtc 2017/03/29 20:02:51 nit: maybe for both these logs do "Interruption ch
Chuck 2017/03/29 20:29:18 Done.
+ is_interrupted_);
is_interrupted_ = false;
- RTCLog(@"Interruption ended. Updating audio unit state.");
UpdateAudioUnit([RTCAudioSession sharedInstance].canPlayOrRecord);
}

Powered by Google App Engine
This is Rietveld 408576698