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

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

Issue 1435003002: Trivial initialization fix in AudioDeviceIOS (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 | no next file » | 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698