please read the MediaPlayerTest.java file.
// The following tests are all a bit flaky, which is why they're retried a
// few times in a loop.
// This test uses one mp3 that is silent but has a strong positive DC offset,
// and a second mp3 that is also silent but has a strong negative DC offset.
// If the two are played back overlapped, they will cancel each other out,
// and result in zeroes being detected. If there is a gap in playback, that
// will also result in zeroes being detected.
// Note that this test does NOT guarantee that the correct data is played
public void testGapless1() throws Exception {
flakyTestWrapper(R.raw.monodcpos, R.raw.monodcneg);
}
// This test is similar, but uses two identical m4a files that have some noise
// with a strong positive DC offset. This is used to detect if there is
// a gap in playback
// Note that this test does NOT guarantee that the correct data is played
public void testGapless2() throws Exception {
flakyTestWrapper(R.raw.stereonoisedcpos, R.raw.stereonoisedcpos);
}
// same as above, but with a mono file
public void testGapless3() throws Exception {
flakyTestWrapper(R.raw.mononoisedcpos, R.raw.mononoisedcpos);
}