OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 #include "webrtc/modules/audio_processing/aec3/echo_canceller3.h" | 10 #include "webrtc/modules/audio_processing/aec3/echo_canceller3.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 kRenderTransferQueueSize, | 220 kRenderTransferQueueSize, |
221 std::vector<std::vector<float>>( | 221 std::vector<std::vector<float>>( |
222 num_bands_, | 222 num_bands_, |
223 std::vector<float>(frame_length_, 0.f)), | 223 std::vector<float>(frame_length_, 0.f)), |
224 Aec3RenderQueueItemVerifier(num_bands_, frame_length_)), | 224 Aec3RenderQueueItemVerifier(num_bands_, frame_length_)), |
225 block_processor_(std::move(block_processor)), | 225 block_processor_(std::move(block_processor)), |
226 render_queue_output_frame_(num_bands_, | 226 render_queue_output_frame_(num_bands_, |
227 std::vector<float>(frame_length_, 0.f)), | 227 std::vector<float>(frame_length_, 0.f)), |
228 block_(num_bands_, std::vector<float>(kBlockSize, 0.f)), | 228 block_(num_bands_, std::vector<float>(kBlockSize, 0.f)), |
229 sub_frame_view_(num_bands_) { | 229 sub_frame_view_(num_bands_) { |
| 230 RTC_DCHECK(ValidFullBandRate(sample_rate_hz_)); |
| 231 |
230 std::unique_ptr<CascadedBiQuadFilter> render_highpass_filter; | 232 std::unique_ptr<CascadedBiQuadFilter> render_highpass_filter; |
231 if (use_highpass_filter) { | 233 if (use_highpass_filter) { |
232 render_highpass_filter.reset(new CascadedBiQuadFilter( | 234 render_highpass_filter.reset(new CascadedBiQuadFilter( |
233 sample_rate_hz_ == 8000 ? kHighPassFilterCoefficients_8kHz | 235 sample_rate_hz_ == 8000 ? kHighPassFilterCoefficients_8kHz |
234 : kHighPassFilterCoefficients_16kHz, | 236 : kHighPassFilterCoefficients_16kHz, |
235 sample_rate_hz_ == 8000 ? kNumberOfHighPassBiQuads_8kHz | 237 sample_rate_hz_ == 8000 ? kNumberOfHighPassBiQuads_8kHz |
236 : kNumberOfHighPassBiQuads_16kHz)); | 238 : kNumberOfHighPassBiQuads_16kHz)); |
237 capture_highpass_filter_.reset(new CascadedBiQuadFilter( | 239 capture_highpass_filter_.reset(new CascadedBiQuadFilter( |
238 sample_rate_hz_ == 8000 ? kHighPassFilterCoefficients_8kHz | 240 sample_rate_hz_ == 8000 ? kHighPassFilterCoefficients_8kHz |
239 : kHighPassFilterCoefficients_16kHz, | 241 : kHighPassFilterCoefficients_16kHz, |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 block_processor_.get(), &block_) && | 355 block_processor_.get(), &block_) && |
354 successful_buffering; | 356 successful_buffering; |
355 | 357 |
356 frame_to_buffer = | 358 frame_to_buffer = |
357 render_transfer_queue_.Remove(&render_queue_output_frame_); | 359 render_transfer_queue_.Remove(&render_queue_output_frame_); |
358 } | 360 } |
359 return successful_buffering; | 361 return successful_buffering; |
360 } | 362 } |
361 | 363 |
362 } // namespace webrtc | 364 } // namespace webrtc |
OLD | NEW |