Removed hysteresis in the delay estimation offset


Bug: chromium:811658,webrtc:8879
Change-Id: I9e67fd9aaae4b85e344b9b40ca6bcf9a8fe1eec1
Reviewed-on: https://webrtc-review.googlesource.com/52480
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22002}
diff --git a/modules/audio_processing/aec3/render_delay_controller.cc b/modules/audio_processing/aec3/render_delay_controller.cc
index 614f0ad..6120c3e 100644
--- a/modules/audio_processing/aec3/render_delay_controller.cc
+++ b/modules/audio_processing/aec3/render_delay_controller.cc
@@ -213,9 +213,7 @@
       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);