From ffa1d173fe8326f86b8111e19341d25285124953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=85hgren?= Date: Thu, 11 Apr 2019 15:44:38 +0200 Subject: [PATCH] AEC3: Correcting minimum comfort noise levels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL corrects the minimum bound for the estimated comfort noise level. Bug: webrtc:10533 Change-Id: I473275ffbc7bb52572315849f30e13b764109d92 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132003 Reviewed-by: Per Åhgren Reviewed-by: Gustaf Ullberg Commit-Queue: Per Åhgren Cr-Commit-Position: refs/heads/master@{#27567} --- modules/audio_processing/aec3/comfort_noise_generator.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/audio_processing/aec3/comfort_noise_generator.cc b/modules/audio_processing/aec3/comfort_noise_generator.cc index 1e3cdf2786..bedd227b3b 100644 --- a/modules/audio_processing/aec3/comfort_noise_generator.cc +++ b/modules/audio_processing/aec3/comfort_noise_generator.cc @@ -139,8 +139,9 @@ void ComfortNoiseGenerator::Compute( } } - // Limit the noise to a floor of -96 dBFS. - constexpr float kNoiseFloor = 440.f; + // Limit the noise to a floor matching a WGN input of -96 dBFS. + constexpr float kNoiseFloor = 17.1267f; + for (auto& n : N2_) { n = std::max(n, kNoiseFloor); }