diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc index 6c097eae4d..f96c8e741e 100644 --- a/webrtc/media/engine/webrtcvoiceengine.cc +++ b/webrtc/media/engine/webrtcvoiceengine.cc @@ -643,13 +643,7 @@ WebRtcVoiceEngine::WebRtcVoiceEngine( options.experimental_ns = rtc::Optional(false); options.intelligibility_enhancer = rtc::Optional(false); options.level_control = rtc::Optional(false); -// TODO(ivoc): Always enable residual echo detector after benchmarking on -// mobile. -#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) - options.residual_echo_detector = rtc::Optional(false); -#else options.residual_echo_detector = rtc::Optional(true); -#endif bool error = ApplyOptions(options); RTC_DCHECK(error); } @@ -714,7 +708,6 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) { options.experimental_agc = rtc::Optional(false); options.extended_filter_aec = rtc::Optional(false); options.experimental_ns = rtc::Optional(false); - options.residual_echo_detector = rtc::Optional(false); #endif // Delay Agnostic AEC automatically turns on EC if not set except on iOS @@ -947,6 +940,11 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) { apm_config_.high_pass_filter.enabled = *options.highpass_filter; } + if (options.residual_echo_detector) { + apm_config_.residual_echo_detector.enabled = + *options.residual_echo_detector; + } + apm()->SetExtraOptions(config); apm()->ApplyConfig(apm_config_);