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; |
} |