Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Unified Diff: webrtc/modules/audio_processing/audio_processing_impl.cc

Issue 2808073002: Add information about microphone gain changes to AEC3 (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/audio_processing_impl.cc
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc
index 636d6ca5f0090a1cadac8d4b9c488523418d0dad..af5e94b60293ba74d2524a2a9036cd88c2bdd6fa 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ b/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -1145,6 +1145,10 @@ int AudioProcessingImpl::ProcessCaptureStreamLocked() {
}
if (private_submodules_->echo_canceller3) {
+ const int new_agc_level = gain_control()->stream_analog_level();
+ capture_.echo_path_gain_change =
+ (capture_.previous_agc_level != new_agc_level);
+ capture_.previous_agc_level = new_agc_level;
private_submodules_->echo_canceller3->AnalyzeCapture(capture_buffer);
}
@@ -1193,7 +1197,8 @@ int AudioProcessingImpl::ProcessCaptureStreamLocked() {
}
if (private_submodules_->echo_canceller3) {
- private_submodules_->echo_canceller3->ProcessCapture(capture_buffer, false);
+ private_submodules_->echo_canceller3->ProcessCapture(
+ capture_buffer, capture_.echo_path_gain_change);
} else {
RETURN_ON_ERR(public_submodules_->echo_cancellation->ProcessCaptureAudio(
capture_buffer, stream_delay_ms()));
@@ -1993,7 +1998,9 @@ AudioProcessingImpl::ApmCaptureState::ApmCaptureState(
array_geometry(array_geometry),
target_direction(target_direction),
capture_processing_format(kSampleRate16kHz),
- split_rate(kSampleRate16kHz) {}
+ split_rate(kSampleRate16kHz),
+ previous_agc_level(0),
+ echo_path_gain_change(false) {}
AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default;
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698