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

Side by Side Diff: webrtc/modules/audio_device/android/opensles_recorder.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 months 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 ALOGD("CreateAudioRecorder"); 223 ALOGD("CreateAudioRecorder");
224 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 224 RTC_DCHECK(thread_checker_.CalledOnValidThread());
225 if (recorder_object_.Get()) 225 if (recorder_object_.Get())
226 return true; 226 return true;
227 RTC_DCHECK(!recorder_); 227 RTC_DCHECK(!recorder_);
228 RTC_DCHECK(!simple_buffer_queue_); 228 RTC_DCHECK(!simple_buffer_queue_);
229 229
230 // Audio source configuration. 230 // Audio source configuration.
231 SLDataLocator_IODevice mic_locator = {SL_DATALOCATOR_IODEVICE, 231 SLDataLocator_IODevice mic_locator = {SL_DATALOCATOR_IODEVICE,
232 SL_IODEVICE_AUDIOINPUT, 232 SL_IODEVICE_AUDIOINPUT,
233 SL_DEFAULTDEVICEID_AUDIOINPUT, NULL}; 233 SL_DEFAULTDEVICEID_AUDIOINPUT, nullptr};
234 SLDataSource audio_source = {&mic_locator, NULL}; 234 SLDataSource audio_source = {&mic_locator, nullptr};
235 235
236 // Audio sink configuration. 236 // Audio sink configuration.
237 SLDataLocator_AndroidSimpleBufferQueue buffer_queue = { 237 SLDataLocator_AndroidSimpleBufferQueue buffer_queue = {
238 SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE, 238 SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE,
239 static_cast<SLuint32>(kNumOfOpenSLESBuffers)}; 239 static_cast<SLuint32>(kNumOfOpenSLESBuffers)};
240 SLDataSink audio_sink = {&buffer_queue, &pcm_format_}; 240 SLDataSink audio_sink = {&buffer_queue, &pcm_format_};
241 241
242 // Create the audio recorder object (requires the RECORD_AUDIO permission). 242 // Create the audio recorder object (requires the RECORD_AUDIO permission).
243 // Do not realize the recorder yet. Set the configuration first. 243 // Do not realize the recorder yet. Set the configuration first.
244 const SLInterfaceID interface_id[] = {SL_IID_ANDROIDSIMPLEBUFFERQUEUE, 244 const SLInterfaceID interface_id[] = {SL_IID_ANDROIDSIMPLEBUFFERQUEUE,
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 SLAndroidSimpleBufferQueueState state = GetBufferQueueState(); 417 SLAndroidSimpleBufferQueueState state = GetBufferQueueState();
418 ALOGD("state.count:%d state.index:%d", state.count, state.index); 418 ALOGD("state.count:%d state.index:%d", state.count, state.index);
419 } 419 }
420 420
421 SLuint32 OpenSLESRecorder::GetBufferCount() { 421 SLuint32 OpenSLESRecorder::GetBufferCount() {
422 SLAndroidSimpleBufferQueueState state = GetBufferQueueState(); 422 SLAndroidSimpleBufferQueueState state = GetBufferQueueState();
423 return state.count; 423 return state.count;
424 } 424 }
425 425
426 } // namespace webrtc 426 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698