AGC2 limiter: faster recovery

New limiter tuning to more quickly go back to 0 dB after the limiter
kicks in and the input peak level goes back to normal.

Bug: webrtc:7494
Change-Id: I1050957ca4caf12c4562b899b16c306957dce169
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237701
Reviewed-by: Hanna Silen <silen@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35384}
diff --git a/modules/audio_processing/agc2/agc2_testing_common.h b/modules/audio_processing/agc2/agc2_testing_common.h
index 4572d9c..afed97e 100644
--- a/modules/audio_processing/agc2/agc2_testing_common.h
+++ b/modules/audio_processing/agc2/agc2_testing_common.h
@@ -25,7 +25,7 @@
     static_cast<float>(std::numeric_limits<int16_t>::max());
 
 // Level Estimator test parameters.
-constexpr float kDecayMs = 500.f;
+constexpr float kDecayMs = 20.0f;
 
 // Limiter parameters.
 constexpr float kLimiterMaxInputLevelDbFs = 1.f;
diff --git a/modules/audio_processing/agc2/fixed_digital_level_estimator.cc b/modules/audio_processing/agc2/fixed_digital_level_estimator.cc
index 8223a73..1995b24 100644
--- a/modules/audio_processing/agc2/fixed_digital_level_estimator.cc
+++ b/modules/audio_processing/agc2/fixed_digital_level_estimator.cc
@@ -20,15 +20,16 @@
 namespace webrtc {
 namespace {
 
-constexpr float kInitialFilterStateLevel = 0.f;
+constexpr float kInitialFilterStateLevel = 0.0f;
 
 // Instant attack.
-constexpr float kAttackFilterConstant = 0.f;
-// This is computed from kDecayMs by
-// 10 ** (-1/20 * subframe_duration / kDecayMs).
-// `subframe_duration` is |kFrameDurationMs / kSubFramesInFrame|.
-// kDecayMs is defined in agc2_testing_common.h
-constexpr float kDecayFilterConstant = 0.9998848773724686f;
+constexpr float kAttackFilterConstant = 0.0f;
+
+// Limiter decay constant.
+// Computed as `10 ** (-1/20 * subframe_duration / kDecayMs)` where:
+// - `subframe_duration` is `kFrameDurationMs / kSubFramesInFrame`;
+// - `kDecayMs` is defined in agc2_testing_common.h.
+constexpr float kDecayFilterConstant = 0.9971259f;
 
 }  // namespace