Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: webrtc/modules/audio_processing/aec3/render_delay_controller.h

Issue 2784023002: Major AEC3 render pipeline changes (Closed)
Patch Set: Disabled one more DEATH test that caused issues due to bug on bots Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698