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}
This commit is contained in:
parent
42043b9587
commit
765edc3425
@ -18,7 +18,7 @@ namespace webrtc {
|
||||
namespace {
|
||||
|
||||
// Parameter controlling the adaptation speed.
|
||||
constexpr float kAlpha = 0.01f;
|
||||
constexpr float kAlpha = 0.001f;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ TEST(MeanVarianceEstimatorTests, InsertTwoValues) {
|
||||
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, InsertZeroes) {
|
||||
|
||||
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, ConstantValueTest) {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ namespace webrtc {
|
||||
namespace {
|
||||
|
||||
// Parameter controlling the adaptation speed.
|
||||
constexpr float kAlpha = 0.01f;
|
||||
constexpr float kAlpha = 0.001f;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
@ -91,8 +91,8 @@ TEST(ResidualEchoDetectorTests, EchoWithRenderClockDrift) {
|
||||
// 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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user