| 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 6ec00e40fad6d05f7a13a27b81f3a4d71ba051cd..d17afa6906d2e49ee74ca721168d7b869f64e04f 100644
|
| --- a/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc
|
| +++ b/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc
|
| @@ -111,7 +111,7 @@ void ResidualEchoEstimator::Estimate(
|
| const int filter_delay = *aec_state.FilterDelay();
|
| LinearEstimate(S2_linear, aec_state.Erle(), filter_delay, R2);
|
| AddEchoReverb(S2_linear, aec_state.SaturatedEcho(), filter_delay,
|
| - aec_state.ReverbDecayFactor(), R2);
|
| + aec_state.ReverbDecay(), R2);
|
| } else {
|
| // Estimate the echo generating signal power.
|
| std::array<float, kFftLengthBy2Plus1> X2;
|
| @@ -142,7 +142,12 @@ void ResidualEchoEstimator::Estimate(
|
| AddEchoReverb(*R2, aec_state.SaturatedEcho(),
|
| std::min(static_cast<size_t>(kAdaptiveFilterLength),
|
| delay.value_or(kAdaptiveFilterLength)),
|
| - aec_state.ReverbDecayFactor(), R2);
|
| + aec_state.ReverbDecay(), R2);
|
| + }
|
| +
|
| + // If the echo is deemed inaudible, set the residual echo to zero.
|
| + if (aec_state.InaudibleEcho()) {
|
| + R2->fill(0.f);
|
| }
|
|
|
| // If the echo is saturated, estimate the echo power as the maximum echo power
|
|
|