| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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_remover.h" | 10 #include "webrtc/modules/audio_processing/aec3/echo_remover.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 bool echo_leakage_detected_ = false; | 90 bool echo_leakage_detected_ = false; |
| 91 std::array<float, kBlockSize> x_old_; | 91 std::array<float, kBlockSize> x_old_; |
| 92 AecState aec_state_; | 92 AecState aec_state_; |
| 93 | 93 |
| 94 RTC_DISALLOW_COPY_AND_ASSIGN(EchoRemoverImpl); | 94 RTC_DISALLOW_COPY_AND_ASSIGN(EchoRemoverImpl); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 int EchoRemoverImpl::instance_count_ = 0; | 97 int EchoRemoverImpl::instance_count_ = 0; |
| 98 | 98 |
| 99 EchoRemoverImpl::EchoRemoverImpl(int sample_rate_hz) | 99 EchoRemoverImpl::EchoRemoverImpl(int sample_rate_hz) |
| 100 : data_dumper_( | 100 : fft_(), |
| 101 data_dumper_( |
| 101 new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))), | 102 new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))), |
| 102 optimization_(DetectOptimization()), | 103 optimization_(DetectOptimization()), |
| 103 sample_rate_hz_(sample_rate_hz), | 104 sample_rate_hz_(sample_rate_hz), |
| 104 subtractor_(data_dumper_.get(), optimization_), | 105 subtractor_(data_dumper_.get(), optimization_), |
| 105 suppression_gain_(optimization_), | 106 suppression_gain_(optimization_), |
| 106 cng_(optimization_), | 107 cng_(optimization_), |
| 107 suppression_filter_(sample_rate_hz_), | 108 suppression_filter_(sample_rate_hz_), |
| 108 X_buffer_(optimization_, | 109 X_buffer_(optimization_, |
| 109 std::max(subtractor_.MinFarendBufferLength(), | 110 std::max(subtractor_.MinFarendBufferLength(), |
| 110 power_echo_model_.MinFarendBufferLength()), | 111 power_echo_model_.MinFarendBufferLength()), |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 aec_state_.SaturatedCapture() ? 1 : 0); | 243 aec_state_.SaturatedCapture() ? 1 : 0); |
| 243 } | 244 } |
| 244 | 245 |
| 245 } // namespace | 246 } // namespace |
| 246 | 247 |
| 247 EchoRemover* EchoRemover::Create(int sample_rate_hz) { | 248 EchoRemover* EchoRemover::Create(int sample_rate_hz) { |
| 248 return new EchoRemoverImpl(sample_rate_hz); | 249 return new EchoRemoverImpl(sample_rate_hz); |
| 249 } | 250 } |
| 250 | 251 |
| 251 } // namespace webrtc | 252 } // namespace webrtc |
| OLD | NEW |