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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 Subtractor subtractor_; | 79 Subtractor subtractor_; |
80 SuppressionGain suppression_gain_; | 80 SuppressionGain suppression_gain_; |
81 ComfortNoiseGenerator cng_; | 81 ComfortNoiseGenerator cng_; |
82 SuppressionFilter suppression_filter_; | 82 SuppressionFilter suppression_filter_; |
83 RenderSignalAnalyzer render_signal_analyzer_; | 83 RenderSignalAnalyzer render_signal_analyzer_; |
84 OutputSelector output_selector_; | 84 OutputSelector output_selector_; |
85 ResidualEchoEstimator residual_echo_estimator_; | 85 ResidualEchoEstimator residual_echo_estimator_; |
86 bool echo_leakage_detected_ = false; | 86 bool echo_leakage_detected_ = false; |
87 AecState aec_state_; | 87 AecState aec_state_; |
88 EchoRemoverMetrics metrics_; | 88 EchoRemoverMetrics metrics_; |
89 const AudioProcessing::Config::EchoCanceller3 config_; | |
89 | 90 |
90 RTC_DISALLOW_COPY_AND_ASSIGN(EchoRemoverImpl); | 91 RTC_DISALLOW_COPY_AND_ASSIGN(EchoRemoverImpl); |
91 }; | 92 }; |
92 | 93 |
93 int EchoRemoverImpl::instance_count_ = 0; | 94 int EchoRemoverImpl::instance_count_ = 0; |
94 | 95 |
95 EchoRemoverImpl::EchoRemoverImpl( | 96 EchoRemoverImpl::EchoRemoverImpl( |
96 const AudioProcessing::Config::EchoCanceller3& config, | 97 const AudioProcessing::Config::EchoCanceller3& config, |
97 int sample_rate_hz) | 98 int sample_rate_hz) |
98 : fft_(), | 99 : fft_(), |
99 data_dumper_( | 100 data_dumper_( |
100 new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))), | 101 new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))), |
101 optimization_(DetectOptimization()), | 102 optimization_(DetectOptimization()), |
102 sample_rate_hz_(sample_rate_hz), | 103 sample_rate_hz_(sample_rate_hz), |
103 subtractor_(data_dumper_.get(), optimization_), | 104 subtractor_(data_dumper_.get(), optimization_), |
104 suppression_gain_(optimization_), | 105 suppression_gain_(config, optimization_), |
105 cng_(optimization_), | 106 cng_(optimization_), |
106 suppression_filter_(sample_rate_hz_), | 107 suppression_filter_(sample_rate_hz_), |
107 aec_state_(0.8f) { | 108 residual_echo_estimator_(config_), |
hlundin-webrtc
2017/08/23 14:52:22
This is probably a bug. I guess you would be using
peah-webrtc
2017/08/24 07:00:52
Thanks!!! That definitely was a bug. Good find! I'
| |
109 aec_state_(config), | |
110 config_(config) { | |
108 RTC_DCHECK(ValidFullBandRate(sample_rate_hz)); | 111 RTC_DCHECK(ValidFullBandRate(sample_rate_hz)); |
109 } | 112 } |
110 | 113 |
111 EchoRemoverImpl::~EchoRemoverImpl() = default; | 114 EchoRemoverImpl::~EchoRemoverImpl() = default; |
112 | 115 |
113 void EchoRemoverImpl::ProcessCapture( | 116 void EchoRemoverImpl::ProcessCapture( |
114 const rtc::Optional<size_t>& echo_path_delay_samples, | 117 const rtc::Optional<size_t>& echo_path_delay_samples, |
115 const EchoPathVariability& echo_path_variability, | 118 const EchoPathVariability& echo_path_variability, |
116 bool capture_signal_saturation, | 119 bool capture_signal_saturation, |
117 const RenderBuffer& render_buffer, | 120 const RenderBuffer& render_buffer, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
240 | 243 |
241 } // namespace | 244 } // namespace |
242 | 245 |
243 EchoRemover* EchoRemover::Create( | 246 EchoRemover* EchoRemover::Create( |
244 const AudioProcessing::Config::EchoCanceller3& config, | 247 const AudioProcessing::Config::EchoCanceller3& config, |
245 int sample_rate_hz) { | 248 int sample_rate_hz) { |
246 return new EchoRemoverImpl(config, sample_rate_hz); | 249 return new EchoRemoverImpl(config, sample_rate_hz); |
247 } | 250 } |
248 | 251 |
249 } // namespace webrtc | 252 } // namespace webrtc |
OLD | NEW |