Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Unified Diff: webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc

Issue 3003733002: Utilizing the AEC3 config struct for constants. (Closed)
Patch Set: Added comment Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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(

Powered by Google App Engine
This is Rietveld 408576698