Update the alpha value in the echo detector.
BUG=webrtc:6525
Review-Url: https://codereview.webrtc.org/2506643002
Cr-Commit-Position: refs/heads/master@{#15136}
diff --git a/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc b/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc
index e123615..06baf68 100644
--- a/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc
+++ b/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc
@@ -18,7 +18,7 @@
namespace {
// Parameter controlling the adaptation speed.
-constexpr float kAlpha = 0.01f;
+constexpr float kAlpha = 0.001f;
} // namespace
diff --git a/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator_unittest.cc b/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator_unittest.cc
index ec4350f..ba45745 100644
--- a/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator_unittest.cc
+++ b/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator_unittest.cc
@@ -31,7 +31,7 @@
TEST(MeanVarianceEstimatorTests, InsertZeroes) {
MeanVarianceEstimator test_estimator;
// Insert the same value many times.
- for (size_t i = 0; i < 10000; i++) {
+ for (size_t i = 0; i < 20000; i++) {
test_estimator.Update(0.f);
}
EXPECT_EQ(test_estimator.mean(), 0.f);
@@ -40,7 +40,7 @@
TEST(MeanVarianceEstimatorTests, ConstantValueTest) {
MeanVarianceEstimator test_estimator;
- for (size_t i = 0; i < 10000; i++) {
+ for (size_t i = 0; i < 20000; i++) {
test_estimator.Update(3.f);
}
// The mean should be close to three, and the standard deviation should be
@@ -51,7 +51,7 @@
TEST(MeanVarianceEstimatorTests, AlternatingValueTest) {
MeanVarianceEstimator test_estimator;
- for (size_t i = 0; i < 10000; i++) {
+ for (size_t i = 0; i < 20000; i++) {
test_estimator.Update(1.f);
test_estimator.Update(-1.f);
}
diff --git a/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc b/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc
index aad806d..0b8b68b 100644
--- a/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc
+++ b/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc
@@ -14,7 +14,7 @@
namespace {
// Parameter controlling the adaptation speed.
-constexpr float kAlpha = 0.01f;
+constexpr float kAlpha = 0.001f;
} // namespace
diff --git a/webrtc/modules/audio_processing/residual_echo_detector_unittest.cc b/webrtc/modules/audio_processing/residual_echo_detector_unittest.cc
index cde731d..0784a4f 100644
--- a/webrtc/modules/audio_processing/residual_echo_detector_unittest.cc
+++ b/webrtc/modules/audio_processing/residual_echo_detector_unittest.cc
@@ -91,8 +91,8 @@
// render buffer, clock drift can only be discovered after a certain delay.
// A growing buffer can be caused by jitter or clock drift and it's not
// possible to make this decision right away. For this reason we only expect
- // an echo likelihood of 80% in this test.
- EXPECT_GT(echo_detector.echo_likelihood(), 0.8f);
+ // an echo likelihood of 75% in this test.
+ EXPECT_GT(echo_detector.echo_likelihood(), 0.75f);
}
TEST(ResidualEchoDetectorTests, EchoWithCaptureClockDrift) {