Index: webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc |
diff --git a/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc b/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc |
index f3b310657dbc81ca4ed778c884ab732cc628ca36..c5df82c747933c2cdba19049939bd7a5c449a3fd 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); |
} |