| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 int AudioDeviceIOS::GetRecordAudioParameters(AudioParameters* params) const { | 329 int AudioDeviceIOS::GetRecordAudioParameters(AudioParameters* params) const { |
| 330 LOGI() << "GetRecordAudioParameters"; | 330 LOGI() << "GetRecordAudioParameters"; |
| 331 RTC_DCHECK(record_parameters_.is_valid()); | 331 RTC_DCHECK(record_parameters_.is_valid()); |
| 332 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 332 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 333 *params = record_parameters_; | 333 *params = record_parameters_; |
| 334 return 0; | 334 return 0; |
| 335 } | 335 } |
| 336 | 336 |
| 337 void AudioDeviceIOS::OnInterruptionBegin() { | 337 void AudioDeviceIOS::OnInterruptionBegin() { |
| 338 RTC_DCHECK(thread_); | 338 RTC_DCHECK(thread_); |
| 339 thread_->Post(this, kMessageTypeInterruptionBegin); | 339 thread_->Post(RTC_FROM_HERE, this, kMessageTypeInterruptionBegin); |
| 340 } | 340 } |
| 341 | 341 |
| 342 void AudioDeviceIOS::OnInterruptionEnd() { | 342 void AudioDeviceIOS::OnInterruptionEnd() { |
| 343 RTC_DCHECK(thread_); | 343 RTC_DCHECK(thread_); |
| 344 thread_->Post(this, kMessageTypeInterruptionEnd); | 344 thread_->Post(RTC_FROM_HERE, this, kMessageTypeInterruptionEnd); |
| 345 } | 345 } |
| 346 | 346 |
| 347 void AudioDeviceIOS::OnValidRouteChange() { | 347 void AudioDeviceIOS::OnValidRouteChange() { |
| 348 RTC_DCHECK(thread_); | 348 RTC_DCHECK(thread_); |
| 349 thread_->Post(this, kMessageTypeValidRouteChange); | 349 thread_->Post(RTC_FROM_HERE, this, kMessageTypeValidRouteChange); |
| 350 } | 350 } |
| 351 | 351 |
| 352 void AudioDeviceIOS::OnCanPlayOrRecordChange(bool can_play_or_record) { | 352 void AudioDeviceIOS::OnCanPlayOrRecordChange(bool can_play_or_record) { |
| 353 RTC_DCHECK(thread_); | 353 RTC_DCHECK(thread_); |
| 354 thread_->Post(this, kMessageTypeCanPlayOrRecordChange, | 354 thread_->Post(RTC_FROM_HERE, this, kMessageTypeCanPlayOrRecordChange, |
| 355 new rtc::TypedMessageData<bool>(can_play_or_record)); | 355 new rtc::TypedMessageData<bool>(can_play_or_record)); |
| 356 } | 356 } |
| 357 | 357 |
| 358 OSStatus AudioDeviceIOS::OnDeliverRecordedData( | 358 OSStatus AudioDeviceIOS::OnDeliverRecordedData( |
| 359 AudioUnitRenderActionFlags* flags, | 359 AudioUnitRenderActionFlags* flags, |
| 360 const AudioTimeStamp* time_stamp, | 360 const AudioTimeStamp* time_stamp, |
| 361 UInt32 bus_number, | 361 UInt32 bus_number, |
| 362 UInt32 num_frames, | 362 UInt32 num_frames, |
| 363 AudioBufferList* /* io_data */) { | 363 AudioBufferList* /* io_data */) { |
| 364 OSStatus result = noErr; | 364 OSStatus result = noErr; |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 | 817 |
| 818 // All I/O should be stopped or paused prior to deactivating the audio | 818 // All I/O should be stopped or paused prior to deactivating the audio |
| 819 // session, hence we deactivate as last action. | 819 // session, hence we deactivate as last action. |
| 820 [session lockForConfiguration]; | 820 [session lockForConfiguration]; |
| 821 UnconfigureAudioSession(); | 821 UnconfigureAudioSession(); |
| 822 [session endWebRTCSession:nil]; | 822 [session endWebRTCSession:nil]; |
| 823 [session unlockForConfiguration]; | 823 [session unlockForConfiguration]; |
| 824 } | 824 } |
| 825 | 825 |
| 826 } // namespace webrtc | 826 } // namespace webrtc |
| OLD | NEW |