Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: webrtc/modules/audio_processing/residual_echo_detector_unittest.cc

Issue 2506643002: Update the alpha value in the echo detector. (Closed)
Patch Set: Relaxed some of the unittests due to the slower adaption caused by the lower alpha values. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 if (i % 100 == 0) { 81 if (i % 100 == 0) {
82 // This is causing the simulated clock drift. 82 // This is causing the simulated clock drift.
83 echo_detector.AnalyzeRenderAudio(zeros); 83 echo_detector.AnalyzeRenderAudio(zeros);
84 } 84 }
85 } 85 }
86 // We expect to detect echo with high likelihood. Clock drift is harder to 86 // We expect to detect echo with high likelihood. Clock drift is harder to
87 // correct on the render side than on the capture side. This is due to the 87 // correct on the render side than on the capture side. This is due to the
88 // render buffer, clock drift can only be discovered after a certain delay. 88 // render buffer, clock drift can only be discovered after a certain delay.
89 // A growing buffer can be caused by jitter or clock drift and it's not 89 // A growing buffer can be caused by jitter or clock drift and it's not
90 // possible to make this decision right away. For this reason we only expect 90 // possible to make this decision right away. For this reason we only expect
91 // an echo likelihood of 80% in this test. 91 // an echo likelihood of 75% in this test.
92 EXPECT_GT(echo_detector.echo_likelihood(), 0.8f); 92 EXPECT_GT(echo_detector.echo_likelihood(), 0.75f);
93 } 93 }
94 94
95 TEST(ResidualEchoDetectorTests, EchoWithCaptureClockDrift) { 95 TEST(ResidualEchoDetectorTests, EchoWithCaptureClockDrift) {
96 ResidualEchoDetector echo_detector; 96 ResidualEchoDetector echo_detector;
97 std::vector<float> ones(160, 1.f); 97 std::vector<float> ones(160, 1.f);
98 std::vector<float> zeros(160, 0.f); 98 std::vector<float> zeros(160, 0.f);
99 99
100 // In this test the capture signal has a delay of 10 frames w.r.t. the render 100 // In this test the capture signal has a delay of 10 frames w.r.t. the render
101 // signal, but is otherwise identical. Both signals are periodic with a 20 101 // signal, but is otherwise identical. Both signals are periodic with a 20
102 // frame interval. There is a simulated clock drift of 1% in this test, with 102 // frame interval. There is a simulated clock drift of 1% in this test, with
(...skipping 12 matching lines...) Expand all
115 if (i % 100 == 0) { 115 if (i % 100 == 0) {
116 // This is causing the simulated clock drift. 116 // This is causing the simulated clock drift.
117 echo_detector.AnalyzeCaptureAudio(zeros); 117 echo_detector.AnalyzeCaptureAudio(zeros);
118 } 118 }
119 } 119 }
120 // We expect to detect echo with near certain likelihood. 120 // We expect to detect echo with near certain likelihood.
121 EXPECT_NEAR(1.f, echo_detector.echo_likelihood(), 0.01f); 121 EXPECT_NEAR(1.f, echo_detector.echo_likelihood(), 0.01f);
122 } 122 }
123 123
124 } // namespace webrtc 124 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698