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@6489 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
d27d9ae644
commit
5c3f4e3b0f
@ -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();
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user