AEC3: Enable usage of external delay estimator

This change makes it possible to disable AEC3's render delay
controller and delay estimator, and instead rely on an external
delay estimator. The delay is communicated via SetAudioBufferDelay.

When the feature is enabled, no echo removal will be performed
until the first delay is provided.

The delay is

Bug: b/130016532
Change-Id: I16643109d78d770ff1d2713cf247b0b9cce1bc1c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131327
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27467}
This commit is contained in:
Gustaf Ullberg
2019-04-05 16:23:50 +02:00
committed by Commit Bot
parent a553c72659
commit 8f32b6c18c
9 changed files with 86 additions and 40 deletions

View File

@ -118,7 +118,7 @@ TEST(BlockProcessor, DISABLED_DelayControllerIntegration) {
EXPECT_CALL(*render_delay_buffer_mock, Insert(_))
.Times(kNumBlocks)
.WillRepeatedly(Return(RenderDelayBuffer::BufferingEvent::kNone));
EXPECT_CALL(*render_delay_buffer_mock, SetDelay(kDelayInBlocks))
EXPECT_CALL(*render_delay_buffer_mock, AlignFromDelay(kDelayInBlocks))
.Times(AtLeast(1));
EXPECT_CALL(*render_delay_buffer_mock, MaxDelay()).WillOnce(Return(30));
EXPECT_CALL(*render_delay_buffer_mock, Delay())
@ -162,7 +162,7 @@ TEST(BlockProcessor, DISABLED_SubmoduleIntegration) {
.WillRepeatedly(Return(RenderDelayBuffer::BufferingEvent::kNone));
EXPECT_CALL(*render_delay_buffer_mock, PrepareCaptureProcessing())
.Times(kNumBlocks);
EXPECT_CALL(*render_delay_buffer_mock, SetDelay(9)).Times(AtLeast(1));
EXPECT_CALL(*render_delay_buffer_mock, AlignFromDelay(9)).Times(AtLeast(1));
EXPECT_CALL(*render_delay_buffer_mock, Delay())
.Times(kNumBlocks)
.WillRepeatedly(Return(0));