AEC: Adds a reported_delay_enabled_ flag

Adds a feature to completely turn on or off buffer handling based on reported delay values. During startup, reported delays are controlled differently through, e.g., WEBRTC_UNTRUSTED_DELAY. By default, the feature is enabled giving the same output as before this change.

TESTED=trybots, modules_unittest
R=aluebs@webrtc.org, andrew@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12349005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5965 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
bjornv@webrtc.org
2014-04-23 13:20:07 +00:00
parent 26e2b687fc
commit e9d3760d5c
6 changed files with 27 additions and 3 deletions

View File

@ -67,7 +67,8 @@ EchoCancellationImpl::EchoCancellationImpl(const AudioProcessing* apm,
was_stream_drift_set_(false),
stream_has_echo_(false),
delay_logging_enabled_(false),
delay_correction_enabled_(false) {}
delay_correction_enabled_(false),
reported_delay_enabled_(true) {}
EchoCancellationImpl::~EchoCancellationImpl() {}
@ -361,6 +362,8 @@ int EchoCancellationImpl::ConfigureHandle(void* handle) const {
WebRtcAec_enable_delay_correction(WebRtcAec_aec_core(
static_cast<Handle*>(handle)), delay_correction_enabled_ ? 1 : 0);
WebRtcAec_enable_reported_delay(WebRtcAec_aec_core(
static_cast<Handle*>(handle)), reported_delay_enabled_ ? 1 : 0);
return WebRtcAec_set_config(static_cast<Handle*>(handle), config);
}