From 9aed31c24eee9144e5ca3ab4ee48722c8fd24460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=85hgren?= Date: Thu, 29 Jun 2017 20:23:27 +0200 Subject: [PATCH] Temporarily removed the analog gain change detection in AEC3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to the implementation of the analog AGC in the audio processing module, the detection for the analog gain done in AEC3 fails on some platforms where there is no analog gain to control. This CL removes that functionality until the AGC behavior has been corrected. Bug: webrtc:7910, chromium:738322 Change-Id: Ibdbe1e02252387dfd94b36ba7471f5c56ae27f48 Reviewed-on: https://chromium-review.googlesource.com/556040 Reviewed-by: Ivo Creusen Commit-Queue: Per Ã…hgren Cr-Commit-Position: refs/heads/master@{#18850} --- webrtc/modules/audio_processing/audio_processing_impl.cc | 8 +++----- webrtc/modules/audio_processing/audio_processing_impl.h | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc index e151c43131..39fb723e0a 100644 --- a/webrtc/modules/audio_processing/audio_processing_impl.cc +++ b/webrtc/modules/audio_processing/audio_processing_impl.cc @@ -1229,10 +1229,9 @@ int AudioProcessingImpl::ProcessCaptureStreamLocked() { } if (private_submodules_->echo_canceller3) { - const int new_agc_level = gain_control()->stream_analog_level(); - capture_.echo_path_gain_change = - abs(capture_.previous_agc_level - new_agc_level) > 5; - capture_.previous_agc_level = new_agc_level; + // TODO(peah): Reactivate analogue AGC gain detection once the analogue AGC + // issues have been addressed. + capture_.echo_path_gain_change = false; private_submodules_->echo_canceller3->AnalyzeCapture(capture_buffer); } @@ -2257,7 +2256,6 @@ AudioProcessingImpl::ApmCaptureState::ApmCaptureState( target_direction(target_direction), capture_processing_format(kSampleRate16kHz), split_rate(kSampleRate16kHz), - previous_agc_level(0), echo_path_gain_change(false) {} AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; diff --git a/webrtc/modules/audio_processing/audio_processing_impl.h b/webrtc/modules/audio_processing/audio_processing_impl.h index b4128a98ca..4f70bd66b2 100644 --- a/webrtc/modules/audio_processing/audio_processing_impl.h +++ b/webrtc/modules/audio_processing/audio_processing_impl.h @@ -409,7 +409,6 @@ class AudioProcessingImpl : public AudioProcessing { // tracked by the capture_audio_. StreamConfig capture_processing_format; int split_rate; - int previous_agc_level; bool echo_path_gain_change; } capture_ GUARDED_BY(crit_capture_);