From fdd4400ef48f17ed2a8bcf841938c30f1d89588e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=85hgren?= Date: Tue, 13 Feb 2018 14:01:46 +0100 Subject: [PATCH] Removed hysteresis in the delay estimation offset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: chromium:811658,webrtc:8879 Change-Id: I9e67fd9aaae4b85e344b9b40ca6bcf9a8fe1eec1 Reviewed-on: https://webrtc-review.googlesource.com/52480 Reviewed-by: Gustaf Ullberg Commit-Queue: Per Ã…hgren Cr-Commit-Position: refs/heads/master@{#22002} --- modules/audio_processing/aec3/render_delay_controller.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/audio_processing/aec3/render_delay_controller.cc b/modules/audio_processing/aec3/render_delay_controller.cc index 614f0ad65c..6120c3ecae 100644 --- a/modules/audio_processing/aec3/render_delay_controller.cc +++ b/modules/audio_processing/aec3/render_delay_controller.cc @@ -213,9 +213,7 @@ rtc::Optional RenderDelayControllerImpl::GetDelay( delay_samples_->quality == DelayEstimate::Quality::kRefined) { // Compute the skew offset and add a margin. offset_blocks = *skew_ - *skew; - if (abs(offset_blocks) <= 1) { - offset_blocks = 0; - } else if (soft_reset_counter_ > 10 * kNumBlocksPerSecond) { + if (offset_blocks != 0 && soft_reset_counter_ > 10 * kNumBlocksPerSecond) { // Soft reset the delay estimator if there is a significant offset // detected. delay_estimator_.Reset(true);