| 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 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 class FineAudioBuffer; | 22 class FineAudioBuffer; |
| 23 | 23 |
| 24 // Implements full duplex 16-bit mono PCM audio support for iOS using a | 24 // Implements full duplex 16-bit mono PCM audio support for iOS using a |
| 25 // Voice-Processing (VP) I/O audio unit in Core Audio. The VP I/O audio unit | 25 // Voice-Processing (VP) I/O audio unit in Core Audio. The VP I/O audio unit |
| 26 // supports audio echo cancellation. It also adds automatic gain control, | 26 // supports audio echo cancellation. It also adds automatic gain control, |
| 27 // adjustment of voice-processing quality and muting. | 27 // adjustment of voice-processing quality and muting. |
| 28 // | 28 // |
| 29 // An instance must be created and destroyed on one and the same thread. | 29 // An instance must be created and destroyed on one and the same thread. |
| 30 // All supported public methods must also be called on the same thread. | 30 // All supported public methods must also be called on the same thread. |
| 31 // A thread checker will DCHECK if any supported method is called on an invalid | 31 // A thread checker will RTC_DCHECK if any supported method is called on an |
| 32 // thread. | 32 // invalid thread. |
| 33 // | 33 // |
| 34 // Recorded audio will be delivered on a real-time internal I/O thread in the | 34 // Recorded audio will be delivered on a real-time internal I/O thread in the |
| 35 // audio unit. The audio unit will also ask for audio data to play out on this | 35 // audio unit. The audio unit will also ask for audio data to play out on this |
| 36 // same thread. | 36 // same thread. |
| 37 class AudioDeviceIOS : public AudioDeviceGeneric { | 37 class AudioDeviceIOS : public AudioDeviceGeneric { |
| 38 public: | 38 public: |
| 39 AudioDeviceIOS(); | 39 AudioDeviceIOS(); |
| 40 ~AudioDeviceIOS(); | 40 ~AudioDeviceIOS(); |
| 41 | 41 |
| 42 void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override; | 42 void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 // The AudioDeviceBuffer is a member of the AudioDeviceModuleImpl instance | 211 // The AudioDeviceBuffer is a member of the AudioDeviceModuleImpl instance |
| 212 // and therefore outlives this object. | 212 // and therefore outlives this object. |
| 213 AudioDeviceBuffer* _audioDeviceBuffer; | 213 AudioDeviceBuffer* _audioDeviceBuffer; |
| 214 | 214 |
| 215 // Contains audio parameters (sample rate, #channels, buffer size etc.) for | 215 // Contains audio parameters (sample rate, #channels, buffer size etc.) for |
| 216 // the playout and recording sides. These structure is set in two steps: | 216 // the playout and recording sides. These structure is set in two steps: |
| 217 // first, native sample rate and #channels are defined in Init(). Next, the | 217 // first, native sample rate and #channels are defined in Init(). Next, the |
| 218 // audio session is activated and we verify that the preferred parameters | 218 // audio session is activated and we verify that the preferred parameters |
| 219 // were granted by the OS. At this stage it is also possible to add a third | 219 // were granted by the OS. At this stage it is also possible to add a third |
| 220 // component to the parameters; the native I/O buffer duration. | 220 // component to the parameters; the native I/O buffer duration. |
| 221 // A CHECK will be hit if we for some reason fail to open an audio session | 221 // A RTC_CHECK will be hit if we for some reason fail to open an audio session |
| 222 // using the specified parameters. | 222 // using the specified parameters. |
| 223 AudioParameters _playoutParameters; | 223 AudioParameters _playoutParameters; |
| 224 AudioParameters _recordParameters; | 224 AudioParameters _recordParameters; |
| 225 | 225 |
| 226 // The Voice-Processing I/O unit has the same characteristics as the | 226 // The Voice-Processing I/O unit has the same characteristics as the |
| 227 // Remote I/O unit (supports full duplex low-latency audio input and output) | 227 // Remote I/O unit (supports full duplex low-latency audio input and output) |
| 228 // and adds AEC for for two-way duplex communication. It also adds AGC, | 228 // and adds AEC for for two-way duplex communication. It also adds AGC, |
| 229 // adjustment of voice-processing quality, and muting. Hence, ideal for | 229 // adjustment of voice-processing quality, and muting. Hence, ideal for |
| 230 // VoIP applications. | 230 // VoIP applications. |
| 231 AudioUnit _vpioUnit; | 231 AudioUnit _vpioUnit; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 // Set to true after successful call to InitPlayout(), false otherwise. | 273 // Set to true after successful call to InitPlayout(), false otherwise. |
| 274 bool _playIsInitialized; | 274 bool _playIsInitialized; |
| 275 | 275 |
| 276 // Audio interruption observer instance. | 276 // Audio interruption observer instance. |
| 277 void* _audioInterruptionObserver; | 277 void* _audioInterruptionObserver; |
| 278 }; | 278 }; |
| 279 | 279 |
| 280 } // namespace webrtc | 280 } // namespace webrtc |
| 281 | 281 |
| 282 #endif // WEBRTC_MODULES_AUDIO_DEVICE_IOS_AUDIO_DEVICE_IOS_H_ | 282 #endif // WEBRTC_MODULES_AUDIO_DEVICE_IOS_AUDIO_DEVICE_IOS_H_ |
| OLD | NEW |