Playing wav file causes error

edited February 2017 in Library Questions

Hello everyone,

I'm trying to program a little audio player using minim which needs to read big files. The loading does work but the play or loop method causes an error when executing the processing file with the big audio file (about 300 mb).

java.lang.ArrayIndexOutOfBoundsException: 15 at javazoom.jl.decoder.LayerIDecoder$SubbandLayer1Stereo.read_allocation( at javazoom.jl.decoder.LayerIDecoder.readAllocation( at javazoom.jl.decoder.LayerIDecoder.decodeFrame( at javazoom.jl.decoder.Decoder.decodeFrame( at javazoom.spi.mpeg.sampled.convert.DecodedMpegAudioInputStream.execute(Unknown Source) at at at ddf.minim.javasound.JSBaseAudioRecordingStream.readBytesWrap( at ddf.minim.javasound.JSBaseAudioRecordingStream.readBytesLoop( at ddf.minim.javasound.JSBaseAudioRecordingStream.mRead( at at ddf.minim.javasound.JSAudioOutput.readStream( at

Does anyone know what the problem is?

I tried my player also with the same file as mp3. This works but when I want to cue some seconds back it needs a lot of time. It is extreme when I want to go to the mid or end of the file. Can anyone explain how minim works?

Thank you very much in advance for your help.



  • I suggest trying playing your file with examples that comes with the Minim library. Try both .wav and .mp3 and see if you see the same issues.


  • Hi kfrajer,

    thank you for your reply. I tried it with the sample projects from minim which has a similar behavior as my player. But the problem also there exists.

    The large wav file about 300mb cannot be played. As a mp3 it works. But when I skip to a previous position in the file, it tooks so much time to go there and playback again. Also when I only want to skip five seconds back. Forward is quite ok, but not satisfactory when going more forward than, let's say, 30 seconds or more. But backward is a big issue.

    It seems that when skipping back, the functionality from the library is to start from the beginning again and going to this position.

  • @DnS42 --

    Can you provide sample code of the problem you are experiencing skipping back with an MP3 file? How big (MB) / long (seconds) is your MP3?

  • Hi @jeremydouglass,

    thanks for your answer. I started a new thread for the skipping back issue. You can have a look there. I also provided sample code.

    You can use this sample code also for loading a bigger wav file and trying to play, which would cover the issue in this thread. This would cause an exception. My wav file was about 300 MB and about 30 minutes.

Sign In or Register to comment.