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; }