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

Side by Side Diff: webrtc/modules/audio_mixer/audio_mixer_impl.cc

Issue 2776113002: Send data from mixer to APM limiter more often. (Closed)
Patch Set: Minor changes in response to hlundin@'s comments. Created 3 years, 8 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
« no previous file with comments | « webrtc/modules/audio_mixer/BUILD.gn ('k') | webrtc/modules/audio_mixer/frame_combiner.h » ('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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 void AudioMixerImpl::Mix(size_t number_of_channels, 135 void AudioMixerImpl::Mix(size_t number_of_channels,
136 AudioFrame* audio_frame_for_mixing) { 136 AudioFrame* audio_frame_for_mixing) {
137 RTC_DCHECK(number_of_channels == 1 || number_of_channels == 2); 137 RTC_DCHECK(number_of_channels == 1 || number_of_channels == 2);
138 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); 138 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
139 139
140 CalculateOutputFrequency(); 140 CalculateOutputFrequency();
141 141
142 { 142 {
143 rtc::CritScope lock(&crit_); 143 rtc::CritScope lock(&crit_);
144 const size_t number_of_streams = audio_source_list_.size();
144 frame_combiner_.Combine(GetAudioFromSources(), number_of_channels, 145 frame_combiner_.Combine(GetAudioFromSources(), number_of_channels,
145 OutputFrequency(), audio_frame_for_mixing); 146 OutputFrequency(), number_of_streams,
147 audio_frame_for_mixing);
146 } 148 }
147 149
148 return; 150 return;
149 } 151 }
150 152
151 void AudioMixerImpl::CalculateOutputFrequency() { 153 void AudioMixerImpl::CalculateOutputFrequency() {
152 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); 154 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
153 rtc::CritScope lock(&crit_); 155 rtc::CritScope lock(&crit_);
154 156
155 std::vector<int> preferred_rates; 157 std::vector<int> preferred_rates;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 245
244 const auto iter = FindSourceInList(audio_source, &audio_source_list_); 246 const auto iter = FindSourceInList(audio_source, &audio_source_list_);
245 if (iter != audio_source_list_.end()) { 247 if (iter != audio_source_list_.end()) {
246 return (*iter)->is_mixed; 248 return (*iter)->is_mixed;
247 } 249 }
248 250
249 LOG(LS_ERROR) << "Audio source unknown"; 251 LOG(LS_ERROR) << "Audio source unknown";
250 return false; 252 return false;
251 } 253 }
252 } // namespace webrtc 254 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_mixer/BUILD.gn ('k') | webrtc/modules/audio_mixer/frame_combiner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698