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}
This commit is contained in:
Ivo Creusen
2018-03-14 17:13:48 +01:00
committed by Commit Bot
parent bbeb2d5130
commit 647ef09d1e
4 changed files with 16 additions and 6 deletions

View File

@ -1792,8 +1792,10 @@ void AudioProcessingImpl::InitializeGainController2() {
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() {