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

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

Issue 2780263002: Add logging around audio session interruptions (Closed)
Patch Set: Modify logging to be clearer. 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
« no previous file with comments | « no previous file | webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6a1cd04fe0a61b8a1d26fcef7549a369c6a7d754 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,8 @@ void AudioDeviceIOS::OnMessage(rtc::Message *msg) {
void AudioDeviceIOS::HandleInterruptionBegin() {
RTC_DCHECK(thread_checker_.CalledOnValidThread());
+ RTCLog(@"Interruption begin. IsInterrupted changed from %d to 1.",
+ is_interrupted_);
if (audio_unit_ &&
audio_unit_->GetState() == VoiceProcessingAudioUnit::kStarted) {
RTCLog(@"Stopping the audio unit due to interruption begin.");
@@ -481,8 +485,9 @@ void AudioDeviceIOS::HandleInterruptionBegin() {
void AudioDeviceIOS::HandleInterruptionEnd() {
RTC_DCHECK(thread_checker_.CalledOnValidThread());
+ RTCLog(@"Interruption ended. IsInterrupted changed from %d to 0. "
+ "Updating audio unit state.", is_interrupted_);
is_interrupted_ = false;
- RTCLog(@"Interruption ended. Updating audio unit state.");
UpdateAudioUnit([RTCAudioSession sharedInstance].canPlayOrRecord);
}
« no previous file with comments | « no previous file | webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698