java.security.AccessControlException: access denied (java.io.FilePermission sound.wav read)
java.lang.NullPointerException
at world.act(world.java:58)
at greenfoot.core.Simulation.actWorld(Simulation.java:509)
at greenfoot.core.Simulation.runOneLoop(Simulation.java:452)
at greenfoot.core.Simulation.runContent(Simulation.java:199)
at greenfoot.core.Simulation.run(Simulation.java:187)
int Reader.read() gets a 4 byte 2's compliment integer (also known as an "int" :) using the bitwise and operator, and then shifting, you can extract each of the four bytes such as given integer i, (i&0x00FF0000)>>>>
Of course you can also just convert them normally. I'm not sure if this is as accurate though.
I just remebered something: getClass().getResourceAsStream("filename goes here(relative to class file)") should work on applets. The InputStream returned supports the availabe() and read(byte[]) methods that you are using
A new version of this scenario was uploaded on Mon Jan 30 23:45:03 UTC 2012
Fixing the galler issues, as well as updating the player such that it doesn't have to preload the entire sound file into an array
Looking much better! Seeing lines, although they seem to be a little out of step with the track. Where did you get the track by the way? What's it called and who by?
Yeah there is still some issues with the file reading which is causing it to get off the track under certain conditions. As for the music, it is called Earth Mover and it's by me :D
Haha I can provide you with a couple high quality files of some of my other work if you like? Also yeah the music does keep playing, it is actually a bit easier that way XD The visualization should still be correct if you press play again though (if it was actually working in the Gallery in the first place that is)
A new version of this scenario was uploaded on Thu Feb 02 18:38:49 UTC 2012
Changed to a radial list based buffer to fix Gallery issues
2011/1/17
2011/1/17
2011/1/17
2011/1/17
2011/1/17
2011/1/17
2011/1/17
2011/1/18
2011/1/18
2011/1/18
2011/1/18
2011/1/18
2011/1/18
2012/1/30
2012/2/2
2012/2/2
2012/2/2
2012/2/2
2012/2/2
2012/2/2
2012/2/2
2012/2/2
2012/2/5
2012/2/5
2012/2/5
2012/10/6
2013/4/28
2013/4/28