| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |