From 85864be8ef21d00ffd2a9cf80ea03ac4d239e5f1 Mon Sep 17 00:00:00 2001 From: peah Date: Thu, 24 Aug 2017 06:01:36 -0700 Subject: [PATCH] Robustify the AEC3 inaudible echo detection This CL robustifies the inaudible echo detection in AEC3 such that a requirement is that either the render and capture signals are aligned or that a headset has been detected. This ensures that the inaudible detection has been able to base the desicion on reliable signals. BUG=webrtc:8150 Review-Url: https://codereview.webrtc.org/3005503002 Cr-Commit-Position: refs/heads/master@{#19491} --- .../modules/audio_processing/aec3/residual_echo_estimator.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc b/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc index f3b310657d..c5df82c747 100644 --- a/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc +++ b/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc @@ -144,7 +144,8 @@ void ResidualEchoEstimator::Estimate( } // If the echo is deemed inaudible, set the residual echo to zero. - if (aec_state.InaudibleEcho()) { + if (aec_state.InaudibleEcho() && + (aec_state.ExternalDelay() || aec_state.HeadsetDetected())) { R2->fill(0.f); }