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(LayerIDecoder.java:396) at javazoom.jl.decoder.LayerIDecoder.readAllocation(LayerIDecoder.java:108) at javazoom.jl.decoder.LayerIDecoder.decodeFrame(LayerIDecoder.java:72) at javazoom.jl.decoder.Decoder.decodeFrame(Decoder.java:147) at javazoom.spi.mpeg.sampled.convert.DecodedMpegAudioInputStream.execute(Unknown Source) at org.tritonus.share.TCircularBuffer.read(TCircularBuffer.java:134) at org.tritonus.share.sampled.convert.TAsynchronousFilteredAudioInputStream.read(TAsynchronousFilteredAudioInputStream.java:189) at ddf.minim.javasound.JSBaseAudioRecordingStream.readBytesWrap(JSBaseAudioRecordingStream.java:305) at ddf.minim.javasound.JSBaseAudioRecordingStream.readBytesLoop(JSBaseAudioRecordingStream.java:287) at ddf.minim.javasound.JSBaseAudioRecordingStream.mRead(JSBaseAudioRecordingStream.java:701) at ddf.minim.javasound.JSBaseAudioRecordingStream.read(JSBaseAudioRecordingStream.java:680) at ddf.minim.javasound.JSAudioOutput.readStream(JSAudioOutput.java:125) at ddf.minim.javasound.JSAudioOutput.run(JSAudioOutput.java:74)

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.

Tagged:

Answers

  • 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.

    Kf

  • 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.