aboutsummaryrefslogtreecommitdiff
path: root/modules/audio_processing/aec3/matched_filter_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/audio_processing/aec3/matched_filter_unittest.cc')
-rw-r--r--modules/audio_processing/aec3/matched_filter_unittest.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/modules/audio_processing/aec3/matched_filter_unittest.cc b/modules/audio_processing/aec3/matched_filter_unittest.cc
index 137275fd74..37b51fa624 100644
--- a/modules/audio_processing/aec3/matched_filter_unittest.cc
+++ b/modules/audio_processing/aec3/matched_filter_unittest.cc
@@ -206,6 +206,7 @@ TEST(MatchedFilter, LagEstimation) {
kWindowSizeSubBlocks, kNumMatchedFilters,
kAlignmentShiftSubBlocks, 150,
config.delay.delay_estimate_smoothing,
+ config.delay.delay_estimate_smoothing_delay_found,
config.delay.delay_candidate_detection_threshold);
std::unique_ptr<RenderDelayBuffer> render_delay_buffer(
@@ -231,7 +232,7 @@ TEST(MatchedFilter, LagEstimation) {
downsampled_capture_data.data(), sub_block_size);
capture_decimator.Decimate(capture[0], downsampled_capture);
filter.Update(render_delay_buffer->GetDownsampledRenderBuffer(),
- downsampled_capture);
+ downsampled_capture, false);
}
// Obtain the lag estimates.
@@ -318,6 +319,7 @@ TEST(MatchedFilter, LagNotReliableForUncorrelatedRenderAndCapture) {
kWindowSizeSubBlocks, kNumMatchedFilters,
kAlignmentShiftSubBlocks, 150,
config.delay.delay_estimate_smoothing,
+ config.delay.delay_estimate_smoothing_delay_found,
config.delay.delay_candidate_detection_threshold);
// Analyze the correlation between render and capture.
@@ -325,7 +327,8 @@ TEST(MatchedFilter, LagNotReliableForUncorrelatedRenderAndCapture) {
RandomizeSampleVector(&random_generator, render[0][0]);
RandomizeSampleVector(&random_generator, capture);
render_delay_buffer->Insert(render);
- filter.Update(render_delay_buffer->GetDownsampledRenderBuffer(), capture);
+ filter.Update(render_delay_buffer->GetDownsampledRenderBuffer(), capture,
+ false);
}
// Obtain the lag estimates.
@@ -361,6 +364,7 @@ TEST(MatchedFilter, LagNotUpdatedForLowLevelRender) {
kWindowSizeSubBlocks, kNumMatchedFilters,
kAlignmentShiftSubBlocks, 150,
config.delay.delay_estimate_smoothing,
+ config.delay.delay_estimate_smoothing_delay_found,
config.delay.delay_candidate_detection_threshold);
std::unique_ptr<RenderDelayBuffer> render_delay_buffer(
RenderDelayBuffer::Create(EchoCanceller3Config(), kSampleRateHz,
@@ -379,7 +383,7 @@ TEST(MatchedFilter, LagNotUpdatedForLowLevelRender) {
sub_block_size);
capture_decimator.Decimate(capture[0], downsampled_capture);
filter.Update(render_delay_buffer->GetDownsampledRenderBuffer(),
- downsampled_capture);
+ downsampled_capture, false);
}
// Obtain the lag estimates.
@@ -407,6 +411,7 @@ TEST(MatchedFilter, NumberOfLagEstimates) {
MatchedFilter filter(&data_dumper, DetectOptimization(), sub_block_size,
32, num_matched_filters, 1, 150,
config.delay.delay_estimate_smoothing,
+ config.delay.delay_estimate_smoothing_delay_found,
config.delay.delay_candidate_detection_threshold);
EXPECT_EQ(num_matched_filters, filter.GetLagEstimates().size());
}
@@ -421,6 +426,7 @@ TEST(MatchedFilterDeathTest, ZeroWindowSize) {
EchoCanceller3Config config;
EXPECT_DEATH(MatchedFilter(&data_dumper, DetectOptimization(), 16, 0, 1, 1,
150, config.delay.delay_estimate_smoothing,
+ config.delay.delay_estimate_smoothing_delay_found,
config.delay.delay_candidate_detection_threshold),
"");
}
@@ -430,6 +436,7 @@ TEST(MatchedFilterDeathTest, NullDataDumper) {
EchoCanceller3Config config;
EXPECT_DEATH(MatchedFilter(nullptr, DetectOptimization(), 16, 1, 1, 1, 150,
config.delay.delay_estimate_smoothing,
+ config.delay.delay_estimate_smoothing_delay_found,
config.delay.delay_candidate_detection_threshold),
"");
}
@@ -441,6 +448,7 @@ TEST(MatchedFilterDeathTest, DISABLED_BlockSizeMultipleOf4) {
EchoCanceller3Config config;
EXPECT_DEATH(MatchedFilter(&data_dumper, DetectOptimization(), 15, 1, 1, 1,
150, config.delay.delay_estimate_smoothing,
+ config.delay.delay_estimate_smoothing_delay_found,
config.delay.delay_candidate_detection_threshold),
"");
}
@@ -453,6 +461,7 @@ TEST(MatchedFilterDeathTest, DISABLED_SubBlockSizeAddsUpToBlockSize) {
EchoCanceller3Config config;
EXPECT_DEATH(MatchedFilter(&data_dumper, DetectOptimization(), 12, 1, 1, 1,
150, config.delay.delay_estimate_smoothing,
+ config.delay.delay_estimate_smoothing_delay_found,
config.delay.delay_candidate_detection_threshold),
"");
}