| Index: webrtc/modules/audio_processing/aec3/render_delay_controller.h
|
| diff --git a/webrtc/modules/audio_processing/aec3/render_delay_controller.h b/webrtc/modules/audio_processing/aec3/render_delay_controller.h
|
| index b22a5fde16d3503c8976108e96e285bc9cc0ea81..469d571ddbfec9bf58908fb3fd7cc2d88fc51315 100644
|
| --- a/webrtc/modules/audio_processing/aec3/render_delay_controller.h
|
| +++ b/webrtc/modules/audio_processing/aec3/render_delay_controller.h
|
| @@ -13,6 +13,7 @@
|
|
|
| #include "webrtc/base/array_view.h"
|
| #include "webrtc/base/optional.h"
|
| +#include "webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h"
|
| #include "webrtc/modules/audio_processing/aec3/render_delay_buffer.h"
|
| #include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
|
|
|
| @@ -21,16 +22,18 @@ namespace webrtc {
|
| // Class for aligning the render and capture signal using a RenderDelayBuffer.
|
| class RenderDelayController {
|
| public:
|
| - static RenderDelayController* Create(
|
| - int sample_rate_hz,
|
| - const RenderDelayBuffer& render_delay_buffer);
|
| + static RenderDelayController* Create(int sample_rate_hz);
|
| virtual ~RenderDelayController() = default;
|
|
|
| - // Aligns the render buffer content with the capture signal.
|
| - virtual size_t GetDelay(rtc::ArrayView<const float> capture) = 0;
|
| + // Resets the delay controller.
|
| + virtual void Reset() = 0;
|
| +
|
| + // Receives the externally used delay.
|
| + virtual void SetDelay(size_t render_delay) = 0;
|
|
|
| - // Analyzes the render signal and returns false if there is a buffer overrun.
|
| - virtual bool AnalyzeRender(rtc::ArrayView<const float> render) = 0;
|
| + // Aligns the render buffer content with the capture signal.
|
| + virtual size_t GetDelay(const DownsampledRenderBuffer& render_buffer,
|
| + rtc::ArrayView<const float> capture) = 0;
|
|
|
| // Returns an approximate value for the headroom in the buffer alignment.
|
| virtual rtc::Optional<size_t> AlignmentHeadroomSamples() const = 0;
|
|
|