diff options
author | bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-06-19 09:51:29 +0000 |
---|---|---|
committer | bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-06-19 09:51:29 +0000 |
commit | 341671ffc95ce03f89608f56c35378c647cb62c1 (patch) | |
tree | 8c0434632dd29b3671aee6af68a1c7f12d717914 /modules | |
parent | 852ce034ce0bcce70979c0741d5dc03b5380f3ce (diff) | |
download | webrtc-341671ffc95ce03f89608f56c35378c647cb62c1.tar.gz |
Fixes and re-enables tests disabled on Android
Several tests were disabled in r6325 and r6326. Also, see issue 3445. This CL fixes the remaining four of the audio_processing related ones. Affects the tests:
- SystemDelayTest.CorrectDelayAfterStableBufferBuildUp
- SystemDelayTest.CorrectDelayDuringDrift
- SystemDelayTest.ShouldRecoverAfterGlitch
- ApmTest.EchoCancellationReportsCorrectDelays
The tests assumes reported delays are used, which now is explicitly set.
BUG=3445
TESTED=trybots
R=aluebs@webrtc.org, kwiberg@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/19769004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6489 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'modules')
-rw-r--r-- | modules/audio_processing/aec/system_delay_unittest.cc | 16 | ||||
-rw-r--r-- | modules/audio_processing/test/audio_processing_unittest.cc | 5 |
2 files changed, 16 insertions, 5 deletions
diff --git a/modules/audio_processing/aec/system_delay_unittest.cc b/modules/audio_processing/aec/system_delay_unittest.cc index e85fc28f..a13d4762 100644 --- a/modules/audio_processing/aec/system_delay_unittest.cc +++ b/modules/audio_processing/aec/system_delay_unittest.cc @@ -248,12 +248,14 @@ TEST_F(SystemDelayTest, CorrectDelayAfterUnstableStartup) { } } -TEST_F(SystemDelayTest, - DISABLED_ON_ANDROID(CorrectDelayAfterStableBufferBuildUp)) { +TEST_F(SystemDelayTest, CorrectDelayAfterStableBufferBuildUp) { // In this test we start by establishing the device buffer size during stable // conditions, but with an empty internal far-end buffer. Once that is done we // verify that the system delay is increased correctly until we have reach an // internal buffer size of 75% of what's been reported. + + // This test assumes the reported delays are used. + WebRtcAec_enable_reported_delay(WebRtcAec_aec_core(handle_), 1); for (size_t i = 0; i < kNumSampleRates; i++) { Init(kSampleRateHz[i]); @@ -330,11 +332,14 @@ TEST_F(SystemDelayTest, CorrectDelayWhenBufferUnderrun) { } } -TEST_F(SystemDelayTest, DISABLED_ON_ANDROID(CorrectDelayDuringDrift)) { +TEST_F(SystemDelayTest, CorrectDelayDuringDrift) { // This drift test should verify that the system delay is never exceeding the // device buffer. The drift is simulated by decreasing the reported device // buffer size by 1 ms every 100 ms. If the device buffer size goes below 30 // ms we jump (add) 10 ms to give a repeated pattern. + + // This test assumes the reported delays are used. + WebRtcAec_enable_reported_delay(WebRtcAec_aec_core(handle_), 1); for (size_t i = 0; i < kNumSampleRates; i++) { Init(kSampleRateHz[i]); RunStableStartup(); @@ -361,13 +366,16 @@ TEST_F(SystemDelayTest, DISABLED_ON_ANDROID(CorrectDelayDuringDrift)) { } } -TEST_F(SystemDelayTest, DISABLED_ON_ANDROID(ShouldRecoverAfterGlitch)) { +TEST_F(SystemDelayTest, ShouldRecoverAfterGlitch) { // This glitch test should verify that the system delay recovers if there is // a glitch in data. The data glitch is constructed as 200 ms of buffering // after which the stable procedure continues. The glitch is never reported by // the device. // The system is said to be in a non-causal state if the difference between // the device buffer and system delay is less than a block (64 samples). + + // This test assumes the reported delays are used. + WebRtcAec_enable_reported_delay(WebRtcAec_aec_core(handle_), 1); for (size_t i = 0; i < kNumSampleRates; i++) { Init(kSampleRateHz[i]); RunStableStartup(); diff --git a/modules/audio_processing/test/audio_processing_unittest.cc b/modules/audio_processing/test/audio_processing_unittest.cc index 406c3de5..1905e963 100644 --- a/modules/audio_processing/test/audio_processing_unittest.cc +++ b/modules/audio_processing/test/audio_processing_unittest.cc @@ -827,7 +827,7 @@ TEST_F(ApmTest, EchoCancellation) { EXPECT_FALSE(apm_->echo_cancellation()->aec_core() != NULL); } -TEST_F(ApmTest, DISABLED_ON_ANDROID(EchoCancellationReportsCorrectDelays)) { +TEST_F(ApmTest, EchoCancellationReportsCorrectDelays) { // Enable AEC only. EXPECT_EQ(apm_->kNoError, apm_->echo_cancellation()->enable_drift_compensation(false)); @@ -836,6 +836,9 @@ TEST_F(ApmTest, DISABLED_ON_ANDROID(EchoCancellationReportsCorrectDelays)) { EXPECT_EQ(apm_->kNoError, apm_->echo_cancellation()->enable_delay_logging(true)); EXPECT_EQ(apm_->kNoError, apm_->echo_cancellation()->Enable(true)); + Config config; + config.Set<ReportedDelay>(new ReportedDelay(true)); + apm_->SetExtraOptions(config); // Internally in the AEC the amount of lookahead the delay estimation can // handle is 15 blocks and the maximum delay is set to 60 blocks. |