Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: webrtc/modules/audio_device/ios/audio_device_ios.h

Issue 1435293003: Improved error handling in iOS ADM to avoid race during init (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: nits Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_device/ios/audio_device_ios.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_device/ios/audio_device_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698