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

Side by Side Diff: webrtc/modules/audio_device/android/audio_manager.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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // If one already has been created, return existing object instead of 129 // If one already has been created, return existing object instead of
130 // creating a new. 130 // creating a new.
131 if (engine_object_.Get() != nullptr) { 131 if (engine_object_.Get() != nullptr) {
132 ALOGI("The OpenSL ES engine object has already been created"); 132 ALOGI("The OpenSL ES engine object has already been created");
133 return engine_object_.Get(); 133 return engine_object_.Get();
134 } 134 }
135 // Create the engine object in thread safe mode. 135 // Create the engine object in thread safe mode.
136 const SLEngineOption option[] = { 136 const SLEngineOption option[] = {
137 {SL_ENGINEOPTION_THREADSAFE, static_cast<SLuint32>(SL_BOOLEAN_TRUE)}}; 137 {SL_ENGINEOPTION_THREADSAFE, static_cast<SLuint32>(SL_BOOLEAN_TRUE)}};
138 SLresult result = 138 SLresult result =
139 slCreateEngine(engine_object_.Receive(), 1, option, 0, NULL, NULL); 139 slCreateEngine(engine_object_.Receive(), 1, option, 0, nullptr, nullptr);
140 if (result != SL_RESULT_SUCCESS) { 140 if (result != SL_RESULT_SUCCESS) {
141 ALOGE("slCreateEngine() failed: %s", GetSLErrorString(result)); 141 ALOGE("slCreateEngine() failed: %s", GetSLErrorString(result));
142 engine_object_.Reset(); 142 engine_object_.Reset();
143 return nullptr; 143 return nullptr;
144 } 144 }
145 // Realize the SL Engine in synchronous mode. 145 // Realize the SL Engine in synchronous mode.
146 result = engine_object_->Realize(engine_object_.Get(), SL_BOOLEAN_FALSE); 146 result = engine_object_->Realize(engine_object_.Get(), SL_BOOLEAN_FALSE);
147 if (result != SL_RESULT_SUCCESS) { 147 if (result != SL_RESULT_SUCCESS) {
148 ALOGE("Realize() failed: %s", GetSLErrorString(result)); 148 ALOGE("Realize() failed: %s", GetSLErrorString(result));
149 engine_object_.Reset(); 149 engine_object_.Reset();
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 return playout_parameters_; 290 return playout_parameters_;
291 } 291 }
292 292
293 const AudioParameters& AudioManager::GetRecordAudioParameters() { 293 const AudioParameters& AudioManager::GetRecordAudioParameters() {
294 RTC_CHECK(record_parameters_.is_valid()); 294 RTC_CHECK(record_parameters_.is_valid());
295 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 295 RTC_DCHECK(thread_checker_.CalledOnValidThread());
296 return record_parameters_; 296 return record_parameters_;
297 } 297 }
298 298
299 } // namespace webrtc 299 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698