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

Side by Side Diff: webrtc/modules/audio_processing/echo_cancellation_impl.cc

Issue 2419023002: Corrected the emptying of the render queues for the AEC and AECM when these become full. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | webrtc/modules/audio_processing/echo_control_mobile_impl.cc » ('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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 audio->num_frames_per_band())); 159 audio->num_frames_per_band()));
160 } 160 }
161 } 161 }
162 162
163 // Insert the samples into the queue. 163 // Insert the samples into the queue.
164 if (!render_signal_queue_->Insert(&render_queue_buffer_)) { 164 if (!render_signal_queue_->Insert(&render_queue_buffer_)) {
165 // The data queue is full and needs to be emptied. 165 // The data queue is full and needs to be emptied.
166 ReadQueuedRenderData(); 166 ReadQueuedRenderData();
167 167
168 // Retry the insert (should always work). 168 // Retry the insert (should always work).
169 RTC_DCHECK_EQ(render_signal_queue_->Insert(&render_queue_buffer_), true); 169 bool result = render_signal_queue_->Insert(&render_queue_buffer_);
170 RTC_DCHECK(result);
170 } 171 }
171 172
172 return AudioProcessing::kNoError; 173 return AudioProcessing::kNoError;
173 } 174 }
174 175
175 // Read chunks of data that were received and queued on the render side from 176 // Read chunks of data that were received and queued on the render side from
176 // a queue. All the data chunks are buffered into the farend signal of the AEC. 177 // a queue. All the data chunks are buffered into the farend signal of the AEC.
177 void EchoCancellationImpl::ReadQueuedRenderData() { 178 void EchoCancellationImpl::ReadQueuedRenderData() {
178 rtc::CritScope cs_capture(crit_capture_); 179 rtc::CritScope cs_capture(crit_capture_);
179 if (!enabled_) { 180 if (!enabled_) {
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 return error; 573 return error;
573 } 574 }
574 575
575 size_t EchoCancellationImpl::NumCancellersRequired() const { 576 size_t EchoCancellationImpl::NumCancellersRequired() const {
576 RTC_DCHECK(stream_properties_); 577 RTC_DCHECK(stream_properties_);
577 return stream_properties_->num_output_channels * 578 return stream_properties_->num_output_channels *
578 stream_properties_->num_reverse_channels; 579 stream_properties_->num_reverse_channels;
579 } 580 }
580 581
581 } // namespace webrtc 582 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/echo_control_mobile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698