![]() ![]() The exeption is only thrown if I play soundfiles longer than about 1 minute. ![]() It could be something like this: GreenfootSound gfs new GreenfootSound (soundFiles i+'.mp3') where you can then use gfs.play (), gfs.stop (), or any one of a number of object methods in the GreenfootSound class. Its possible the tags could be causing it - I re-encoded the tracks into mp3 using audacity / lame and in my particular case that seemed to solve it. In the Component 2 exam of the WJEC / Eduqas 2016 specification, an audio file will be placed in the sounds folder already. If you have the variable outside the method, it will be available to all your code inside the class, and wont ever change unless you tell it to. Sound files must be placed the sounds folder of your Greenfoot project to be used in the game. I've got a problem with some GreenfootSounds: sometimes I get this exception:Įxception in thread "SoundStream:file:/D:/Daten/Schule/Informatik/Java/Greenfoot-Szenarien/StarWars%20Szenarios/Star%20Wars%20Szenario%20V6.6/sounds/Mass%20Effect%203%20Soundtrack%20-%20The%20View%20of%20Palaven%20OST%20Music%205-2.mp3" : Could not open sound file: file:/D:/Daten/Schule/Informatik/Java/Greenfoot-Szenarien/StarWars%20Szenarios/Star%20Wars%20Szenario%20V6.6/sounds/Mass%20Effect%203%20Soundtrack%20-%20The%20View%20of%20Palaven%20OST%20Music%205-2.mp3Īt (SoundExceptionHandler.java:66)Īt (SoundStream.java:374)Ĭaused by: java.io.IOException: javazoom.jl.decoder.BitstreamException: Bitstream errorcode 102Īt (Mp3AudioInputStream.java:223)Īt (SoundStream.java:302) The GreenfootSound constructor needs a string representing the full filename of the sound file. Ive seen this issue before, I believe its a bug in the JLayer mp3 library Greenfoot uses rather than with Greenfoot itself, and to that end theres not an awful lot we can do about it. The sound keeps looping because you made a variable inside a method, that turns back to false every time the method is called (which is every frame).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |