Hi!
I want to play a sound in a loop, so I used playLoop().
It works but each time the sound repeat an error occur :
Exception in thread "SoundStream:file:/C:/Users/Loïc/Desktop/TowerDefense-2.0-Loïc%20Rosset%203A1/Tower%20Defense/sounds/Strength%20of%20a%20Thousand%20Men.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:722)
Here is my code for the sound:
private GreenfootSound gameSound1= new GreenfootSound("Strength of a Thousand Men.mp3"); public void act() { gameSound1.playLoop(); }