From cb0ea43e5751bc7e27ab8edd82b9f3af8807af39 Mon Sep 17 00:00:00 2001 From: "bjornv@webrtc.org" Date: Mon, 9 Jun 2014 08:21:52 +0000 Subject: [PATCH] audio_processing: Forces extended filter to be used in splitting filter test. The behavior differ between "normal" and "extended" modes when using AEC. In the extended filter mode nothing is processed until we have received a farend frame. This is exactly what is needed in this part of the splitting filter test. On Android, we do not use the normal mode, which made the test to fail. BUG=3445 R=kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/12679004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6368 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../audio_processing/test/audio_processing_unittest.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/webrtc/modules/audio_processing/test/audio_processing_unittest.cc b/webrtc/modules/audio_processing/test/audio_processing_unittest.cc index 41cbd7fc6b..406c3de59c 100644 --- a/webrtc/modules/audio_processing/test/audio_processing_unittest.cc +++ b/webrtc/modules/audio_processing/test/audio_processing_unittest.cc @@ -1369,7 +1369,7 @@ TEST_F(ApmTest, IdenticalInputChannelsResultInIdenticalOutputChannels) { } } -TEST_F(ApmTest, DISABLED_ON_ANDROID(SplittingFilter)) { +TEST_F(ApmTest, SplittingFilter) { // Verify the filter is not active through undistorted audio when: // 1. No components are enabled... SetFrameTo(frame_, 1000); @@ -1417,6 +1417,11 @@ TEST_F(ApmTest, DISABLED_ON_ANDROID(SplittingFilter)) { // TODO(andrew): This test, and the one below, rely rather tenuously on the // behavior of the AEC. Think of something more robust. EXPECT_EQ(apm_->kNoError, apm_->echo_cancellation()->Enable(true)); + // Make sure we have extended filter enabled. This makes sure nothing is + // touched until we have a farend frame. + Config config; + config.Set(new DelayCorrection(true)); + apm_->SetExtraOptions(config); SetFrameTo(frame_, 1000); frame_copy.CopyFrom(*frame_); EXPECT_EQ(apm_->kNoError, apm_->set_stream_delay_ms(0));