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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 bool RecordingError() const override; | 155 bool RecordingError() const override; |
156 void ClearPlayoutWarning() override {} | 156 void ClearPlayoutWarning() override {} |
157 void ClearPlayoutError() override {} | 157 void ClearPlayoutError() override {} |
158 void ClearRecordingWarning() override {} | 158 void ClearRecordingWarning() override {} |
159 void ClearRecordingError() override {} | 159 void ClearRecordingError() override {} |
160 | 160 |
161 // AudioSessionObserver methods. May be called from any thread. | 161 // AudioSessionObserver methods. May be called from any thread. |
162 void OnInterruptionBegin() override; | 162 void OnInterruptionBegin() override; |
163 void OnInterruptionEnd() override; | 163 void OnInterruptionEnd() override; |
164 void OnValidRouteChange() override; | 164 void OnValidRouteChange() override; |
| 165 void OnConfiguredForWebRTC() override; |
165 | 166 |
166 // VoiceProcessingAudioUnitObserver methods. | 167 // VoiceProcessingAudioUnitObserver methods. |
167 OSStatus OnDeliverRecordedData(AudioUnitRenderActionFlags* flags, | 168 OSStatus OnDeliverRecordedData(AudioUnitRenderActionFlags* flags, |
168 const AudioTimeStamp* time_stamp, | 169 const AudioTimeStamp* time_stamp, |
169 UInt32 bus_number, | 170 UInt32 bus_number, |
170 UInt32 num_frames, | 171 UInt32 num_frames, |
171 AudioBufferList* io_data) override; | 172 AudioBufferList* io_data) override; |
172 OSStatus OnGetPlayoutData(AudioUnitRenderActionFlags* flags, | 173 OSStatus OnGetPlayoutData(AudioUnitRenderActionFlags* flags, |
173 const AudioTimeStamp* time_stamp, | 174 const AudioTimeStamp* time_stamp, |
174 UInt32 bus_number, | 175 UInt32 bus_number, |
175 UInt32 num_frames, | 176 UInt32 num_frames, |
176 AudioBufferList* io_data) override; | 177 AudioBufferList* io_data) override; |
177 | 178 |
178 private: | 179 private: |
179 // Called by the relevant AudioSessionObserver methods on |thread_|. | 180 // Called by the relevant AudioSessionObserver methods on |thread_|. |
180 void HandleInterruptionBegin(); | 181 void HandleInterruptionBegin(); |
181 void HandleInterruptionEnd(); | 182 void HandleInterruptionEnd(); |
182 void HandleValidRouteChange(); | 183 void HandleValidRouteChange(); |
| 184 void HandleConfiguredForWebRTC(); |
183 | 185 |
184 // Uses current |playout_parameters_| and |record_parameters_| to inform the | 186 // Uses current |playout_parameters_| and |record_parameters_| to inform the |
185 // audio device buffer (ADB) about our internal audio parameters. | 187 // audio device buffer (ADB) about our internal audio parameters. |
186 void UpdateAudioDeviceBuffer(); | 188 void UpdateAudioDeviceBuffer(); |
187 | 189 |
188 // Since the preferred audio parameters are only hints to the OS, the actual | 190 // Since the preferred audio parameters are only hints to the OS, the actual |
189 // values may be different once the AVAudioSession has been activated. | 191 // values may be different once the AVAudioSession has been activated. |
190 // This method asks for the current hardware parameters and takes actions | 192 // This method asks for the current hardware parameters and takes actions |
191 // if they should differ from what we have asked for initially. It also | 193 // if they should differ from what we have asked for initially. It also |
192 // defines |playout_parameters_| and |record_parameters_|. | 194 // defines |playout_parameters_| and |record_parameters_|. |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 bool rec_is_initialized_; | 277 bool rec_is_initialized_; |
276 | 278 |
277 // Set to true after successful call to InitPlayout(), false otherwise. | 279 // Set to true after successful call to InitPlayout(), false otherwise. |
278 bool play_is_initialized_; | 280 bool play_is_initialized_; |
279 | 281 |
280 // Set to true if audio session is interrupted, false otherwise. | 282 // Set to true if audio session is interrupted, false otherwise. |
281 bool is_interrupted_; | 283 bool is_interrupted_; |
282 | 284 |
283 // Audio interruption observer instance. | 285 // Audio interruption observer instance. |
284 RTCAudioSessionDelegateAdapter* audio_session_observer_; | 286 RTCAudioSessionDelegateAdapter* audio_session_observer_; |
285 | |
286 // Contains the audio data format specification for a stream of audio. | |
287 AudioStreamBasicDescription application_format_; | |
288 }; | 287 }; |
289 | 288 |
290 } // namespace webrtc | 289 } // namespace webrtc |
291 | 290 |
292 #endif // WEBRTC_MODULES_AUDIO_DEVICE_IOS_AUDIO_DEVICE_IOS_H_ | 291 #endif // WEBRTC_MODULES_AUDIO_DEVICE_IOS_AUDIO_DEVICE_IOS_H_ |
OLD | NEW |