From 70045719ab93cba2b932e7c3e0914d316fa692a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=85hgren?= Date: Tue, 9 Oct 2018 01:11:15 +0200 Subject: [PATCH] AEC3: Decrease the modelling of the reverb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL lowers the default reverb decay to better match the standard rooms where calls are made. Bug: webrtc:9843 Change-Id: I46f1a629ecfdd72561829326d4fa58ede8107b6c Reviewed-on: https://webrtc-review.googlesource.com/c/104740 Reviewed-by: Jesus de Vicente Pena Reviewed-by: Gustaf Ullberg Commit-Queue: Per Ã…hgren Cr-Commit-Position: refs/heads/master@{#25061} --- api/audio/echo_canceller3_config.h | 2 +- modules/audio_processing/aec3/echo_canceller3.cc | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/api/audio/echo_canceller3_config.h b/api/audio/echo_canceller3_config.h index e7376ed7bc..49bc895ff3 100644 --- a/api/audio/echo_canceller3_config.h +++ b/api/audio/echo_canceller3_config.h @@ -78,7 +78,7 @@ struct EchoCanceller3Config { float lf = 1.f; float mf = 1.f; float hf = 1.f; - float default_len = 0.88f; + float default_len = 0.83f; bool reverb_based_on_render = true; bool echo_can_saturate = true; bool bounded_erl = false; diff --git a/modules/audio_processing/aec3/echo_canceller3.cc b/modules/audio_processing/aec3/echo_canceller3.cc index e5219c72ab..b2f9229683 100644 --- a/modules/audio_processing/aec3/echo_canceller3.cc +++ b/modules/audio_processing/aec3/echo_canceller3.cc @@ -62,6 +62,10 @@ bool EnableUnityNonZeroRampupGain() { return field_trial::IsEnabled("WebRTC-Aec3EnableUnityNonZeroRampupGain"); } +bool EnableLongReverb() { + return field_trial::IsEnabled("WebRTC-Aec3ShortReverbKillSwitch"); +} + // Method for adjusting config parameter dependencies.. EchoCanceller3Config AdjustConfig(const EchoCanceller3Config& config) { EchoCanceller3Config adjusted_cfg = config; @@ -147,6 +151,10 @@ EchoCanceller3Config AdjustConfig(const EchoCanceller3Config& config) { adjusted_cfg.echo_removal_control.gain_rampup.first_non_zero_gain = 1.f; } + if (EnableLongReverb()) { + adjusted_cfg.ep_strength.default_len = 0.88f; + } + return adjusted_cfg; }