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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 #endif // !defined(NDEBUG) | 191 #endif // !defined(NDEBUG) |
192 | 192 |
193 AudioDeviceIOS::AudioDeviceIOS() | 193 AudioDeviceIOS::AudioDeviceIOS() |
194 : audio_device_buffer_(nullptr), | 194 : audio_device_buffer_(nullptr), |
195 vpio_unit_(nullptr), | 195 vpio_unit_(nullptr), |
196 recording_(0), | 196 recording_(0), |
197 playing_(0), | 197 playing_(0), |
198 initialized_(false), | 198 initialized_(false), |
199 rec_is_initialized_(false), | 199 rec_is_initialized_(false), |
200 play_is_initialized_(false), | 200 play_is_initialized_(false), |
201 audio_interruption_observer_(nullptr) { | 201 audio_interruption_observer_(nullptr), |
| 202 route_change_observer_(nullptr) { |
202 LOGI() << "ctor" << ios::GetCurrentThreadDescription(); | 203 LOGI() << "ctor" << ios::GetCurrentThreadDescription(); |
203 } | 204 } |
204 | 205 |
205 AudioDeviceIOS::~AudioDeviceIOS() { | 206 AudioDeviceIOS::~AudioDeviceIOS() { |
206 LOGI() << "~dtor"; | 207 LOGI() << "~dtor"; |
207 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 208 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
208 Terminate(); | 209 Terminate(); |
209 } | 210 } |
210 | 211 |
211 void AudioDeviceIOS::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) { | 212 void AudioDeviceIOS::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) { |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 // Read decoded 16-bit PCM samples from WebRTC (using a size that matches | 918 // Read decoded 16-bit PCM samples from WebRTC (using a size that matches |
918 // the native I/O audio unit) to a preallocated intermediate buffer and | 919 // the native I/O audio unit) to a preallocated intermediate buffer and |
919 // copy the result to the audio buffer in the |io_data| destination. | 920 // copy the result to the audio buffer in the |io_data| destination. |
920 SInt8* source = playout_audio_buffer_.get(); | 921 SInt8* source = playout_audio_buffer_.get(); |
921 fine_audio_buffer_->GetPlayoutData(source); | 922 fine_audio_buffer_->GetPlayoutData(source); |
922 memcpy(destination, source, dataSizeInBytes); | 923 memcpy(destination, source, dataSizeInBytes); |
923 return noErr; | 924 return noErr; |
924 } | 925 } |
925 | 926 |
926 } // namespace webrtc | 927 } // namespace webrtc |
OLD | NEW |