| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 175 |
| 176 // Restarts active audio streams using a new sample rate. Required when e.g. | 176 // Restarts active audio streams using a new sample rate. Required when e.g. |
| 177 // a BT headset is enabled or disabled. | 177 // a BT headset is enabled or disabled. |
| 178 bool RestartAudioUnitWithNewFormat(float sample_rate); | 178 bool RestartAudioUnitWithNewFormat(float sample_rate); |
| 179 | 179 |
| 180 // Activates our audio session, creates and initializes the voice-processing | 180 // Activates our audio session, creates and initializes the voice-processing |
| 181 // audio unit and verifies that we got the preferred native audio parameters. | 181 // audio unit and verifies that we got the preferred native audio parameters. |
| 182 bool InitPlayOrRecord(); | 182 bool InitPlayOrRecord(); |
| 183 | 183 |
| 184 // Closes and deletes the voice-processing I/O unit. | 184 // Closes and deletes the voice-processing I/O unit. |
| 185 bool ShutdownPlayOrRecord(); | 185 void ShutdownPlayOrRecord(); |
| 186 |
| 187 // Helper method for destroying the existing audio unit. |
| 188 void DisposeAudioUnit(); |
| 186 | 189 |
| 187 // Callback function called on a real-time priority I/O thread from the audio | 190 // Callback function called on a real-time priority I/O thread from the audio |
| 188 // unit. This method is used to signal that recorded audio is available. | 191 // unit. This method is used to signal that recorded audio is available. |
| 189 static OSStatus RecordedDataIsAvailable( | 192 static OSStatus RecordedDataIsAvailable( |
| 190 void* in_ref_con, | 193 void* in_ref_con, |
| 191 AudioUnitRenderActionFlags* io_action_flags, | 194 AudioUnitRenderActionFlags* io_action_flags, |
| 192 const AudioTimeStamp* time_stamp, | 195 const AudioTimeStamp* time_stamp, |
| 193 UInt32 in_bus_number, | 196 UInt32 in_bus_number, |
| 194 UInt32 in_number_frames, | 197 UInt32 in_number_frames, |
| 195 AudioBufferList* io_data); | 198 AudioBufferList* io_data); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 void* audio_interruption_observer_; | 289 void* audio_interruption_observer_; |
| 287 void* route_change_observer_; | 290 void* route_change_observer_; |
| 288 | 291 |
| 289 // Contains the audio data format specification for a stream of audio. | 292 // Contains the audio data format specification for a stream of audio. |
| 290 AudioStreamBasicDescription application_format_; | 293 AudioStreamBasicDescription application_format_; |
| 291 }; | 294 }; |
| 292 | 295 |
| 293 } // namespace webrtc | 296 } // namespace webrtc |
| 294 | 297 |
| 295 #endif // WEBRTC_MODULES_AUDIO_DEVICE_IOS_AUDIO_DEVICE_IOS_H_ | 298 #endif // WEBRTC_MODULES_AUDIO_DEVICE_IOS_AUDIO_DEVICE_IOS_H_ |
| OLD | NEW |