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

Unified Diff: webrtc/modules/audio_processing/aec3/main_filter_update_gain.cc

Issue 2862533002: Corrected the behavior in AEC3 during buffer overruns and underruns (Closed)
Patch Set: Changes in response to reviewer comments 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 | « no previous file | webrtc/modules/audio_processing/aec3/render_delay_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/aec3/main_filter_update_gain.cc
diff --git a/webrtc/modules/audio_processing/aec3/main_filter_update_gain.cc b/webrtc/modules/audio_processing/aec3/main_filter_update_gain.cc
index 9cfb08bdb0fd6aff83e0c39b5791f467b8eb984b..3c4959c11c59d40124576bf02217bd181381d714 100644
--- a/webrtc/modules/audio_processing/aec3/main_filter_update_gain.cc
+++ b/webrtc/modules/audio_processing/aec3/main_filter_update_gain.cc
@@ -22,6 +22,7 @@ namespace webrtc {
namespace {
constexpr float kHErrorInitial = 10000.f;
+constexpr int kPoorExcitationCounterInitial = 1000;
} // namespace
@@ -30,7 +31,7 @@ int MainFilterUpdateGain::instance_count_ = 0;
MainFilterUpdateGain::MainFilterUpdateGain()
: data_dumper_(
new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))),
- poor_excitation_counter_(1000) {
+ poor_excitation_counter_(kPoorExcitationCounterInitial) {
H_error_.fill(kHErrorInitial);
}
@@ -38,6 +39,8 @@ MainFilterUpdateGain::~MainFilterUpdateGain() {}
void MainFilterUpdateGain::HandleEchoPathChange() {
H_error_.fill(kHErrorInitial);
+ poor_excitation_counter_ = kPoorExcitationCounterInitial;
+ call_counter_ = 0;
}
void MainFilterUpdateGain::Compute(
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/aec3/render_delay_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698