diff --git a/api/audio/echo_canceller3_config.h b/api/audio/echo_canceller3_config.h index 96a204a981..4b1c7fbc47 100644 --- a/api/audio/echo_canceller3_config.h +++ b/api/audio/echo_canceller3_config.h @@ -59,7 +59,7 @@ struct RTC_EXPORT EchoCanceller3Config { }; AlignmentMixing render_alignment_mixing = {false, true, 10000.f, true}; AlignmentMixing capture_alignment_mixing = {false, true, 10000.f, false}; - bool detect_pre_echo = false; + bool detect_pre_echo = true; } delay; struct Filter { 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 810b0ae185..ae9c8736ae 100644 --- a/modules/audio_processing/aec3/echo_path_delay_estimator_unittest.cc +++ b/modules/audio_processing/aec3/echo_path_delay_estimator_unittest.cc @@ -71,7 +71,6 @@ TEST(EchoPathDelayEstimator, DelayEstimation) { constexpr int kSampleRateHz = 48000; constexpr size_t kNumBands = NumBandsForRate(kSampleRateHz); - Random random_generator(42U); Block render(kNumBands, kNumRenderChannels); Block capture(/*num_bands=*/1, kNumCaptureChannels); ApmDataDumper data_dumper(0); @@ -82,6 +81,9 @@ TEST(EchoPathDelayEstimator, DelayEstimation) { config.delay.down_sampling_factor = down_sampling_factor; config.delay.num_filters = 10; for (size_t delay_samples : {30, 64, 150, 200, 800, 4000}) { + // Random generator become periodic after a while. To avoid issue in the + // unittest we ensure to seed it for every case. + Random random_generator(42U); SCOPED_TRACE(ProduceDebugText(delay_samples, down_sampling_factor)); std::unique_ptr render_delay_buffer( RenderDelayBuffer::Create(config, kSampleRateHz, kNumRenderChannels));