From d7a212e8b9c76b7c6eaefc6a432b2422b3fe0ab9 Mon Sep 17 00:00:00 2001 From: "bjornv@webrtc.org" Date: Thu, 5 Mar 2015 16:14:18 +0000 Subject: [PATCH] audio_processing/aec: Increased delay metrics aggregation window to five seconds The known clients (GetStats and UMA histogram in Chrome) use at least 5 second aggregation window. There is no particular value in calculating the metrics more often. The CL also includes a small refactoring moving a declaration inside an if statement. BUG=2994 TEST=N/A R=kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/40219004 Cr-Commit-Position: refs/heads/master@{#8619} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8619 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/audio_processing/aec/aec_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/webrtc/modules/audio_processing/aec/aec_core.c b/webrtc/modules/audio_processing/aec/aec_core.c index 8775f8593..ccd5b922f 100644 --- a/webrtc/modules/audio_processing/aec/aec_core.c +++ b/webrtc/modules/audio_processing/aec/aec_core.c @@ -39,7 +39,7 @@ static const size_t kBufSizePartitions = 250; // 1 second of audio in 16 kHz. // Metrics static const int subCountLen = 4; static const int countLen = 50; -static const int kDelayMetricsAggregationWindow = 250; // One second at 16 kHz. +static const int kDelayMetricsAggregationWindow = 1250; // 5 seconds at 16 kHz. // Quantities to control H band scaling for SWB input static const int flagHbandCn = 1; // flag for adding comfort noise in H band @@ -1249,10 +1249,9 @@ static void ProcessBlock(AecCore* aec) { // Block wise delay estimation used for logging if (aec->delay_logging_enabled) { - int delay_estimate = 0; if (WebRtc_AddFarSpectrumFloat( aec->delay_estimator_farend, abs_far_spectrum, PART_LEN1) == 0) { - delay_estimate = WebRtc_DelayEstimatorProcessFloat( + int delay_estimate = WebRtc_DelayEstimatorProcessFloat( aec->delay_estimator, abs_near_spectrum, PART_LEN1); if (delay_estimate >= 0) { // Update delay estimate buffer.