This CL introduces the new functionality for setting the APM parameters to the high-pass filter. The introduction will be done in three steps: 1) This CL which introduces the new scheme and changes the code in webrtcvoiceengine.cc to use it. 2) Introduce the scheme into upstream code. 3) Remove the HighPassFilter interface in APM. BUG=webrtc::6220, webrtc::6296, webrtc::6297, webrtc::6181, webrtc::5298 Review-Url: https://codereview.webrtc.org/2415403002 Cr-Commit-Position: refs/heads/master@{#15197}
diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc index 1f88cb7..96f9ed7 100644 --- a/webrtc/media/engine/webrtcvoiceengine.cc +++ b/webrtc/media/engine/webrtcvoiceengine.cc
@@ -825,14 +825,6 @@ } } - if (options.highpass_filter) { - LOG(LS_INFO) << "High pass filter enabled? " << *options.highpass_filter; - if (voep->EnableHighPassFilter(*options.highpass_filter) == -1) { - LOG_RTCERR1(SetHighpassFilterStatus, *options.highpass_filter); - return false; - } - } - if (options.stereo_swapping) { LOG(LS_INFO) << "Stereo swapping enabled? " << *options.stereo_swapping; voep->EnableStereoChannelSwapping(*options.stereo_swapping); @@ -920,6 +912,10 @@ } } + if (options.highpass_filter) { + apm_config_.high_pass_filter.enabled = *options.highpass_filter; + } + apm()->SetExtraOptions(config); apm()->ApplyConfig(apm_config_);