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

Side by Side Diff: webrtc/modules/audio_device/ios/audio_device_ios.mm

Issue 2355393005: Adds audio session status to logs for each valid audio route change on iOS (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 484
485 is_interrupted_ = false; 485 is_interrupted_ = false;
486 RTCLog(@"Interruption ended. Updating audio unit state."); 486 RTCLog(@"Interruption ended. Updating audio unit state.");
487 UpdateAudioUnit([RTCAudioSession sharedInstance].canPlayOrRecord); 487 UpdateAudioUnit([RTCAudioSession sharedInstance].canPlayOrRecord);
488 } 488 }
489 489
490 void AudioDeviceIOS::HandleValidRouteChange() { 490 void AudioDeviceIOS::HandleValidRouteChange() {
491 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 491 RTC_DCHECK(thread_checker_.CalledOnValidThread());
492 492
493 RTCAudioSession* session = [RTCAudioSession sharedInstance]; 493 RTCAudioSession* session = [RTCAudioSession sharedInstance];
494 RTCLog(@"%@", session);
494 HandleSampleRateChange(session.sampleRate); 495 HandleSampleRateChange(session.sampleRate);
495 } 496 }
496 497
497 void AudioDeviceIOS::HandleCanPlayOrRecordChange(bool can_play_or_record) { 498 void AudioDeviceIOS::HandleCanPlayOrRecordChange(bool can_play_or_record) {
498 RTCLog(@"Handling CanPlayOrRecord change to: %d", can_play_or_record); 499 RTCLog(@"Handling CanPlayOrRecord change to: %d", can_play_or_record);
499 UpdateAudioUnit(can_play_or_record); 500 UpdateAudioUnit(can_play_or_record);
500 } 501 }
501 502
502 void AudioDeviceIOS::HandleSampleRateChange(float sample_rate) { 503 void AudioDeviceIOS::HandleSampleRateChange(float sample_rate) {
503 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 504 RTC_DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 833
833 // All I/O should be stopped or paused prior to deactivating the audio 834 // All I/O should be stopped or paused prior to deactivating the audio
834 // session, hence we deactivate as last action. 835 // session, hence we deactivate as last action.
835 [session lockForConfiguration]; 836 [session lockForConfiguration];
836 UnconfigureAudioSession(); 837 UnconfigureAudioSession();
837 [session endWebRTCSession:nil]; 838 [session endWebRTCSession:nil];
838 [session unlockForConfiguration]; 839 [session unlockForConfiguration];
839 } 840 }
840 841
841 } // namespace webrtc 842 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698