This site requires JavaScript, please enable it in your browser!
Greenfoot back
Corncake288
Corncake288 wrote ...

2013/12/19

Out of Bounds Exception for a Sound?

Corncake288 Corncake288

2013/12/19

#
Hi guys, I'm new to JAVA and I am coding my first game as a project. I finished everything and it is working pretty well, except this shows up every time the game winning sound plays. Exception in thread "SoundStream:file:/D:/Bob/Greenfoot/scenarios/BobLeeSwaggerGamefinal/sounds/Cheer.mp3" java.lang.ArrayIndexOutOfBoundsException: 580 at javazoom.jl.decoder.LayerIIIDecoder.huffman_decode(LayerIIIDecoder.java:795) at javazoom.jl.decoder.LayerIIIDecoder.decode(LayerIIIDecoder.java:278) at javazoom.jl.decoder.LayerIIIDecoder.decodeFrame(LayerIIIDecoder.java:219) at javazoom.jl.decoder.Decoder.decodeFrame(Decoder.java:147) at greenfoot.sound.Mp3AudioInputStream.read(Mp3AudioInputStream.java:230) at greenfoot.sound.SoundStream.run(SoundStream.java:302) at java.lang.Thread.run(Thread.java:744) The code for it is: public void gameWin() { Greenfoot.playSound("Cheer.mp3"); Greenfoot.stop(); } Any and all help would be appreciated.
danpost danpost

2013/12/19

#
That is usually caused by information tags being saved within your sound file. Use a sound editor and re-save the file without the tags.
You need to login to post a reply.