From 366e95252aba863f886aa692459bf267e5525d86 Mon Sep 17 00:00:00 2001 From: "henrik.lundin" Date: Fri, 3 Jul 2015 00:50:05 -0700 Subject: [PATCH] Follow-up: Remove old ReportedDelay AEC config This is a follow-up to r9531, where the configuration ReportedDelay was replaced by DelayAgnostic. The config was kept in the code to avoid API breakages. In https://codereview.chromium.org/1219263003/ depending code has been updated to avoid breakages. BUG=webrtc:4651 R=bjornv@webrtc.org Review URL: https://codereview.webrtc.org/1212653012 Cr-Commit-Position: refs/heads/master@{#9536} --- .../echo_cancellation_impl.cc | 3 +-- .../include/audio_processing.h | 19 +++++-------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/webrtc/modules/audio_processing/echo_cancellation_impl.cc b/webrtc/modules/audio_processing/echo_cancellation_impl.cc index 96e77c5963..f13ea8bde6 100644 --- a/webrtc/modules/audio_processing/echo_cancellation_impl.cc +++ b/webrtc/modules/audio_processing/echo_cancellation_impl.cc @@ -329,8 +329,7 @@ int EchoCancellationImpl::Initialize() { void EchoCancellationImpl::SetExtraOptions(const Config& config) { extended_filter_enabled_ = config.Get().enabled; - delay_agnostic_enabled_ = config.Get().enabled || - !config.Get().enabled; + delay_agnostic_enabled_ = config.Get().enabled; Configure(); } diff --git a/webrtc/modules/audio_processing/include/audio_processing.h b/webrtc/modules/audio_processing/include/audio_processing.h index 80b7b4d2f3..37699b7256 100644 --- a/webrtc/modules/audio_processing/include/audio_processing.h +++ b/webrtc/modules/audio_processing/include/audio_processing.h @@ -60,20 +60,11 @@ struct ExtendedFilter { bool enabled; }; -// Use to disable the reported system delays. By disabling the reported system -// delays the echo cancellation algorithm assumes the process and reverse -// streams to be aligned. This configuration only applies to EchoCancellation -// and not EchoControlMobile and is set with AudioProcessing::SetExtraOptions(). -// Note that by disabling reported system delays the EchoCancellation may -// regress in performance. -// TODO(henrik.lundin): Remove ReportedDelay once DelayAgnostic has -// propagated through to all channels -// (https://code.google.com/p/webrtc/issues/detail?id=4651). -struct ReportedDelay { - ReportedDelay() : enabled(true) {} - explicit ReportedDelay(bool enabled) : enabled(enabled) {} - bool enabled; -}; +// Enables delay-agnostic echo cancellation. This feature relies on internally +// estimated delays between the process and reverse streams, thus not relying +// on reported system delays. This configuration only applies to +// EchoCancellation and not EchoControlMobile. It can be set in the constructor +// or using AudioProcessing::SetExtraOptions(). struct DelayAgnostic { DelayAgnostic() : enabled(false) {} explicit DelayAgnostic(bool enabled) : enabled(enabled) {}