I am trying to easily loop an audio file. I used MP3, which I found that MP3 could not automatically navigate due to silent input to the file.
Now tried the following code using OGG and WAV. Sound loops, but there is a slight (but noticeable) delay between:
AssetFileDescriptor descriptor; descriptor = getAssets().openFd( "rain30s.ogg" ); mp.setDataSource( descriptor.getFileDescriptor(), descriptor.getStartOffset(), descriptor.getLength() ); descriptor.close(); mp.setLooping(true); mp.prepare(); mp.start();
OGG and WAV seamlessly repeat in Audacity.
Can anybody help
source share