Extend delay estimation window in AEC to 500 ms on all platforms

On non-Android the delay estimator in audio_processing/aec has solely been used for logging purposes. The maximum possible observed delay has been 236 ms. We have seen longer delays for which the delay estimate at best ends up at 236 ms, but can also be 'random'. reported delays are clamped to 500 ms.
This cl extends the delay estimation window to match that.

BUG=4086, 3504, 4113
TESTED=locally on Linux and trybots
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7989 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_processing/aec/aec_core_internal.h b/webrtc/modules/audio_processing/aec/aec_core_internal.h
index d11df93..a8f0c0c 100644
--- a/webrtc/modules/audio_processing/aec/aec_core_internal.h
+++ b/webrtc/modules/audio_processing/aec/aec_core_internal.h
@@ -24,20 +24,14 @@
 };
 static const int kNormalNumPartitions = 12;
 
-// Delay estimator constants, used for logging.
-enum {
-  kMaxDelayBlocks = 60
-};
+// Delay estimator constants, used for logging and delay compensation if
+// if reported delays are disabled.
 enum {
   kLookaheadBlocks = 15
 };
 enum {
-#ifdef WEBRTC_ANDROID
   // 500 ms for 16 kHz which is equivalent with the limit of reported delays.
   kHistorySizeBlocks = 125
-#else
-  kHistorySizeBlocks = kMaxDelayBlocks + kLookaheadBlocks
-#endif
 };
 
 // Extended filter adaptation parameters.
diff --git a/webrtc/modules/audio_processing/test/audio_processing_unittest.cc b/webrtc/modules/audio_processing/test/audio_processing_unittest.cc
index 78e79a5..2c916f1 100644
--- a/webrtc/modules/audio_processing/test/audio_processing_unittest.cc
+++ b/webrtc/modules/audio_processing/test/audio_processing_unittest.cc
@@ -826,6 +826,7 @@
 }
 
 TEST_F(ApmTest, DISABLED_EchoCancellationReportsCorrectDelays) {
+  // TODO(bjornv): Fix this test to work with DA-AEC.
   // Enable AEC only.
   EXPECT_EQ(apm_->kNoError,
             apm_->echo_cancellation()->enable_drift_compensation(false));