Index: webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc |
diff --git a/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc b/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc |
index 8905846743399eddd4a4b89628e32dd0a6308ee2..f6dc32b4e60236d2d4d4967f969624d5265cdcb3 100644 |
--- a/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc |
+++ b/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc |
@@ -79,7 +79,9 @@ constexpr float kHeadsetEchoPathGain = 0.0005f; |
} // namespace |
-ResidualEchoEstimator::ResidualEchoEstimator() { |
+ResidualEchoEstimator::ResidualEchoEstimator( |
+ const AudioProcessing::Config::EchoCanceller3& config) |
+ : config_(config) { |
Reset(); |
} |
@@ -188,11 +190,12 @@ void ResidualEchoEstimator::NonLinearEstimate( |
const std::array<float, kFftLengthBy2Plus1>& Y2, |
std::array<float, kFftLengthBy2Plus1>* R2) { |
// Choose gains. |
- const float echo_path_gain_lf = headset_detected ? kHeadsetEchoPathGain : 100; |
+ const float echo_path_gain_lf = |
+ headset_detected ? kHeadsetEchoPathGain : config_.param.ep_strength.lf; |
const float echo_path_gain_mf = |
- headset_detected ? kHeadsetEchoPathGain : 1000; |
+ headset_detected ? kHeadsetEchoPathGain : config_.param.ep_strength.mf; |
const float echo_path_gain_hf = |
- headset_detected ? kHeadsetEchoPathGain : 5000; |
+ headset_detected ? kHeadsetEchoPathGain : config_.param.ep_strength.hf; |
// Compute preliminary residual echo. |
std::transform( |