diff options
Diffstat (limited to 'modules/audio_processing/aec3/echo_path_delay_estimator_unittest.cc')
-rw-r--r-- | modules/audio_processing/aec3/echo_path_delay_estimator_unittest.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/audio_processing/aec3/echo_path_delay_estimator_unittest.cc b/modules/audio_processing/aec3/echo_path_delay_estimator_unittest.cc index 13c9c1122e..810b0ae185 100644 --- a/modules/audio_processing/aec3/echo_path_delay_estimator_unittest.cc +++ b/modules/audio_processing/aec3/echo_path_delay_estimator_unittest.cc @@ -78,6 +78,7 @@ TEST(EchoPathDelayEstimator, DelayEstimation) { constexpr size_t kDownSamplingFactors[] = {2, 4, 8}; for (auto down_sampling_factor : kDownSamplingFactors) { EchoCanceller3Config config; + config.delay.delay_headroom_samples = 0; config.delay.down_sampling_factor = down_sampling_factor; config.delay.num_filters = 10; for (size_t delay_samples : {30, 64, 150, 200, 800, 4000}) { @@ -111,12 +112,13 @@ TEST(EchoPathDelayEstimator, DelayEstimation) { } if (estimated_delay_samples) { - // Allow estimated delay to be off by one sample in the down-sampled - // domain. + // Allow estimated delay to be off by a block as internally the delay is + // quantized with an error up to a block. size_t delay_ds = delay_samples / down_sampling_factor; size_t estimated_delay_ds = estimated_delay_samples->delay / down_sampling_factor; - EXPECT_NEAR(delay_ds, estimated_delay_ds, 1); + EXPECT_NEAR(delay_ds, estimated_delay_ds, + kBlockSize / down_sampling_factor); } else { ADD_FAILURE(); } |