Move iOS noise suppression override to default settings

Bug: None
Change-Id: I2cd642dd29a9b5e7e6141a54609b95318eb7fc85
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195442
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32702}
This commit is contained in:
Sam Zackrisson 2020-11-26 11:37:22 +01:00 committed by Commit Bot
parent 7b463c5f67
commit b7d89ca0d3

View File

@ -337,21 +337,26 @@ void WebRtcVoiceEngine::Init() {
AudioOptions options;
options.echo_cancellation = true;
options.auto_gain_control = true;
#if defined(WEBRTC_IOS)
// On iOS, VPIO provides built-in NS.
options.noise_suppression = false;
options.typing_detection = false;
#else
options.noise_suppression = true;
options.typing_detection = true;
#endif
options.experimental_ns = false;
options.highpass_filter = true;
options.stereo_swapping = false;
options.audio_jitter_buffer_max_packets = 200;
options.audio_jitter_buffer_fast_accelerate = false;
options.audio_jitter_buffer_min_delay_ms = 0;
options.audio_jitter_buffer_enable_rtx_handling = false;
options.typing_detection = true;
options.experimental_agc = false;
options.experimental_ns = false;
options.residual_echo_detector = true;
bool error = ApplyOptions(options);
RTC_DCHECK(error);
}
initialized_ = true;
}
@ -398,14 +403,8 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) {
use_mobile_software_aec = true;
#endif
// Set and adjust noise suppressor options.
#if defined(WEBRTC_IOS)
// On iOS, VPIO provides built-in NS.
options.noise_suppression = false;
options.typing_detection = false;
options.experimental_ns = false;
RTC_LOG(LS_INFO) << "Always disable NS on iOS. Use built-in instead.";
#elif defined(WEBRTC_ANDROID)
// Override noise suppression options for Android.
#if defined(WEBRTC_ANDROID)
options.typing_detection = false;
options.experimental_ns = false;
#endif