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

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

Issue 3007833002: Further utilizing the AEC3 config struct for constants (Closed)
Patch Set: Created 3 years, 4 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/block_processor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/aec3/aec_state.cc
diff --git a/webrtc/modules/audio_processing/aec3/aec_state.cc b/webrtc/modules/audio_processing/aec3/aec_state.cc
index 6908270995a84c3ec36a117eff4916b91fb7c470..d4a3c76d3e32c72d6edfa8062e5f886fe03bcd9f 100644
--- a/webrtc/modules/audio_processing/aec3/aec_state.cc
+++ b/webrtc/modules/audio_processing/aec3/aec_state.cc
@@ -129,7 +129,11 @@ void AecState::Update(const std::vector<std::array<float, kFftLengthBy2Plus1>>&
// Update counters.
const float x_energy = std::inner_product(x.begin(), x.end(), x.begin(), 0.f);
- const bool active_render_block = x_energy > 10000.f * kFftLengthBy2;
+
+ const bool active_render_block =
+ x_energy > (config_.param.render_levels.active_render_limit *
+ config_.param.render_levels.active_render_limit) *
+ kFftLengthBy2;
if (active_render_block) {
render_received_ = true;
}
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/aec3/block_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698