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}
This commit is contained in:
peah 2017-08-24 06:01:36 -07:00 committed by Commit Bot
parent 23bdb6773e
commit 85864be8ef

View File

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