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

Side by Side Diff: webrtc/modules/audio_mixer/audio_mixer_impl.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) 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 AudioFrameList mix_list; 213 AudioFrameList mix_list;
214 { 214 {
215 rtc::CritScope lock(&crit_); 215 rtc::CritScope lock(&crit_);
216 mix_list = GetAudioFromSources(); 216 mix_list = GetAudioFromSources();
217 217
218 for (const auto& frame : mix_list) { 218 for (const auto& frame : mix_list) {
219 RemixFrame(number_of_channels, frame); 219 RemixFrame(number_of_channels, frame);
220 } 220 }
221 221
222 audio_frame_for_mixing->UpdateFrame( 222 audio_frame_for_mixing->UpdateFrame(
223 -1, time_stamp_, NULL, 0, OutputFrequency(), AudioFrame::kNormalSpeech, 223 -1, time_stamp_, nullptr, 0, OutputFrequency(),
224 AudioFrame::kVadPassive, number_of_channels); 224 AudioFrame::kNormalSpeech, AudioFrame::kVadPassive, number_of_channels);
225 225
226 time_stamp_ += static_cast<uint32_t>(sample_size_); 226 time_stamp_ += static_cast<uint32_t>(sample_size_);
227 227
228 use_limiter_ = mix_list.size() > 1; 228 use_limiter_ = mix_list.size() > 1;
229 229
230 // We only use the limiter if we're actually mixing multiple streams. 230 // We only use the limiter if we're actually mixing multiple streams.
231 MixFromList(audio_frame_for_mixing, mix_list, use_limiter_); 231 MixFromList(audio_frame_for_mixing, mix_list, use_limiter_);
232 } 232 }
233 233
234 if (audio_frame_for_mixing->samples_per_channel_ == 0) { 234 if (audio_frame_for_mixing->samples_per_channel_ == 0) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 368
369 const auto iter = FindSourceInList(audio_source, &audio_source_list_); 369 const auto iter = FindSourceInList(audio_source, &audio_source_list_);
370 if (iter != audio_source_list_.end()) { 370 if (iter != audio_source_list_.end()) {
371 return (*iter)->is_mixed; 371 return (*iter)->is_mixed;
372 } 372 }
373 373
374 LOG(LS_ERROR) << "Audio source unknown"; 374 LOG(LS_ERROR) << "Audio source unknown";
375 return false; 375 return false;
376 } 376 }
377 } // namespace webrtc 377 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698