From d6b079686f7803bde1396cc7ef7719fe891cfe0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=85hgren?= Date: Thu, 11 Oct 2018 00:03:01 +0200 Subject: [PATCH] AEC3: Ensure that the usage of stationary signal properties is not unset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL ensures that the default setting for the usage of stationary signal properties is not overridden by mistake. Bug: chromium:894243 Change-Id: I85ab65383ee82b5f3153864da7a0cede7776c146 Reviewed-on: https://webrtc-review.googlesource.com/c/105181 Reviewed-by: Jesus de Vicente Pena Commit-Queue: Per Ã…hgren Cr-Commit-Position: refs/heads/master@{#25104} --- modules/audio_processing/aec3/echo_canceller3.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/audio_processing/aec3/echo_canceller3.cc b/modules/audio_processing/aec3/echo_canceller3.cc index bb5edee27a..4aa239ca27 100644 --- a/modules/audio_processing/aec3/echo_canceller3.cc +++ b/modules/audio_processing/aec3/echo_canceller3.cc @@ -78,6 +78,11 @@ bool UseLegacyNormalSuppressorTuning() { return field_trial::IsEnabled("WebRTC-Aec3UseLegacyNormalSuppressorTuning"); } +bool DeactivateStationarityProperties() { + return field_trial::IsEnabled( + "WebRTC-Aec3UseStationarityPropertiesKillSwitch"); +} + // Method for adjusting config parameter dependencies.. EchoCanceller3Config AdjustConfig(const EchoCanceller3Config& config) { EchoCanceller3Config adjusted_cfg = config; @@ -194,6 +199,13 @@ EchoCanceller3Config AdjustConfig(const EchoCanceller3Config& config) { adjusted_cfg.suppressor.dominant_nearend_detection.hold_duration = 25; } + // TODO(peah): Clean this up once upstream dependencies that forces this to + // zero are resolved. + adjusted_cfg.echo_audibility.use_stationary_properties = true; + if (DeactivateStationarityProperties()) { + adjusted_cfg.echo_audibility.use_stationary_properties = false; + } + return adjusted_cfg; }