Index: webrtc/media/engine/webrtcvoiceengine.cc |
diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc |
index 2db552611220775e67f4f82a936ec949d2b01934..9096154c17f5e4b36b7b9b96bc24c4c036e3c220 100644 |
--- a/webrtc/media/engine/webrtcvoiceengine.cc |
+++ b/webrtc/media/engine/webrtcvoiceengine.cc |
@@ -643,13 +643,7 @@ WebRtcVoiceEngine::WebRtcVoiceEngine( |
options.experimental_ns = rtc::Optional<bool>(false); |
options.intelligibility_enhancer = rtc::Optional<bool>(false); |
options.level_control = rtc::Optional<bool>(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<bool>(false); |
-#else |
options.residual_echo_detector = rtc::Optional<bool>(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<bool>(false); |
options.extended_filter_aec = rtc::Optional<bool>(false); |
options.experimental_ns = rtc::Optional<bool>(false); |
- options.residual_echo_detector = rtc::Optional<bool>(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_); |