OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |