Allow residual echo detector to be enabled/disabled using AudioOptions, and no longer disable it on mobile platforms.

BUG=webrtc:7136

Review-Url: https://codereview.webrtc.org/2679103007
Cr-Commit-Position: refs/heads/master@{#16531}
This commit is contained in:
ivoc 2017-02-10 05:11:09 -08:00 committed by Commit bot
parent bd344e5c14
commit 4ca18696c5

View File

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