diff --git a/media/engine/webrtc_voice_engine.cc b/media/engine/webrtc_voice_engine.cc index 01535540a6..bc382d03e3 100644 --- a/media/engine/webrtc_voice_engine.cc +++ b/media/engine/webrtc_voice_engine.cc @@ -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