From edddac54bcdd6ec3f52acb124799e8fa477ffdd4 Mon Sep 17 00:00:00 2001 From: peah Date: Tue, 16 May 2017 01:08:58 -0700 Subject: [PATCH] Corrected the number of channels used when AEC3 is run on stereo input. BUG=chromium:722343, webrtc:7519 Review-Url: https://codereview.webrtc.org/2883933003 Cr-Commit-Position: refs/heads/master@{#18158} --- webrtc/modules/audio_processing/audio_processing_impl.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc index ea38923dd0..900a8ec437 100644 --- a/webrtc/modules/audio_processing/audio_processing_impl.cc +++ b/webrtc/modules/audio_processing/audio_processing_impl.cc @@ -728,7 +728,10 @@ size_t AudioProcessingImpl::num_input_channels() const { size_t AudioProcessingImpl::num_proc_channels() const { // Used as callback from submodules, hence locking is not allowed. - return capture_nonlocked_.beamformer_enabled ? 1 : num_output_channels(); + return (capture_nonlocked_.beamformer_enabled || + capture_nonlocked_.echo_canceller3_enabled) + ? 1 + : num_output_channels(); } size_t AudioProcessingImpl::num_output_channels() const {