Robustify the faster alignment in AEC3 to avoid resets

The faster AEC3 alignment introduced recently may in
cases cause the alignment (and the AEC3) to repeatedly
reset. This CL avoids these resets by handling buffer
issues (which are triggering the resets) separately
during the initial coarse alignment phase.



Change-Id: Idf5e2ffda2591906da8060d03ec8ca73cdaedf53
Bug: webrtc:8798,chromium:805815
Reviewed-on: https://webrtc-review.googlesource.com/43480
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21758}
This commit is contained in:
Per Åhgren
2018-01-25 07:01:34 +01:00
committed by Commit Bot
parent b9b07eaf28
commit a76ef9d0b4
17 changed files with 148 additions and 109 deletions

View File

@ -13,6 +13,7 @@
#include "api/array_view.h"
#include "api/optional.h"
#include "modules/audio_processing/aec3/delay_estimate.h"
#include "modules/audio_processing/aec3/downsampled_render_buffer.h"
#include "modules/audio_processing/aec3/render_delay_buffer.h"
#include "modules/audio_processing/include/audio_processing.h"
@ -31,11 +32,8 @@ class RenderDelayController {
// Resets the delay controller.
virtual void Reset() = 0;
// Receives the externally used delay.
virtual void SetDelay(size_t render_delay) = 0;
// Aligns the render buffer content with the capture signal.
virtual rtc::Optional<size_t> GetDelay(
virtual rtc::Optional<DelayEstimate> GetDelay(
const DownsampledRenderBuffer& render_buffer,
rtc::ArrayView<const float> capture) = 0;
};