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

Side by Side Diff: webrtc/modules/audio_processing/echo_control_mobile_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 | « webrtc/modules/audio_processing/echo_cancellation_impl.cc ('k') | no next file » | 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 audio->num_frames_per_band())); 167 audio->num_frames_per_band()));
168 render_channel = (render_channel + 1) % audio->num_channels(); 168 render_channel = (render_channel + 1) % audio->num_channels();
169 } 169 }
170 170
171 // Insert the samples into the queue. 171 // Insert the samples into the queue.
172 if (!render_signal_queue_->Insert(&render_queue_buffer_)) { 172 if (!render_signal_queue_->Insert(&render_queue_buffer_)) {
173 // The data queue is full and needs to be emptied. 173 // The data queue is full and needs to be emptied.
174 ReadQueuedRenderData(); 174 ReadQueuedRenderData();
175 175
176 // Retry the insert (should always work). 176 // Retry the insert (should always work).
177 RTC_DCHECK_EQ(render_signal_queue_->Insert(&render_queue_buffer_), true); 177 bool result = render_signal_queue_->Insert(&render_queue_buffer_);
178 RTC_DCHECK(result);
178 } 179 }
179 180
180 return AudioProcessing::kNoError; 181 return AudioProcessing::kNoError;
181 } 182 }
182 183
183 // Read chunks of data that were received and queued on the render side from 184 // Read chunks of data that were received and queued on the render side from
184 // a queue. All the data chunks are buffered into the farend signal of the AEC. 185 // a queue. All the data chunks are buffered into the farend signal of the AEC.
185 void EchoControlMobileImpl::ReadQueuedRenderData() { 186 void EchoControlMobileImpl::ReadQueuedRenderData() {
186 rtc::CritScope cs_capture(crit_capture_); 187 rtc::CritScope cs_capture(crit_capture_);
187 RTC_DCHECK(stream_properties_); 188 RTC_DCHECK(stream_properties_);
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 } 441 }
441 return error; 442 return error;
442 } 443 }
443 444
444 size_t EchoControlMobileImpl::num_handles_required() const { 445 size_t EchoControlMobileImpl::num_handles_required() const {
445 RTC_DCHECK(stream_properties_); 446 RTC_DCHECK(stream_properties_);
446 return stream_properties_->num_output_channels * 447 return stream_properties_->num_output_channels *
447 stream_properties_->num_reverse_channels; 448 stream_properties_->num_reverse_channels;
448 } 449 }
449 } // namespace webrtc 450 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/echo_cancellation_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698