Add more parameters to the Initialize function of the echo detector.
Since the echo detector processes both the render and the capture audio streams, it needs to know the sample rates and number of channels of both.
Bug: webrtc:8732
Change-Id: Icd26e561d5dd98bd789a6dfa75f468f3fde06fee
Reviewed-on: https://webrtc-review.googlesource.com/61861
Reviewed-by: Per Ã…hgren <peah@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22436}
diff --git a/modules/audio_processing/audio_processing_impl.cc b/modules/audio_processing/audio_processing_impl.cc
index 0caa142..554dead 100644
--- a/modules/audio_processing/audio_processing_impl.cc
+++ b/modules/audio_processing/audio_processing_impl.cc
@@ -1792,8 +1792,10 @@
void AudioProcessingImpl::InitializeResidualEchoDetector() {
RTC_DCHECK(private_submodules_->echo_detector);
- private_submodules_->echo_detector->Initialize(proc_sample_rate_hz(),
- num_proc_channels());
+ private_submodules_->echo_detector->Initialize(
+ proc_sample_rate_hz(), num_proc_channels(),
+ formats_.render_processing_format.sample_rate_hz(),
+ formats_.render_processing_format.num_channels());
}
void AudioProcessingImpl::InitializePostProcessor() {