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);    

   }

相关文章:

  • 2022-12-23
  • 2022-03-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-25
  • 2022-12-23
  • 2021-12-09
  • 2021-10-14
  • 2021-08-03
  • 2022-02-25
  • 2021-08-30
相关资源
相似解决方案