Well I've found how to get an AudioFormat, but for some reason I can't get it working still:
1 2 3
| InputStream inputstream = url.openStream(); BasicMP3FileReader mp = new BasicMP3FileReader(); audioInputStream = mp.getAudioInputStream(inputstream); |
Yields
javax.sound.sampled.UnsupportedAudioFileException: incorrect magic number 1228931072
This will give me a working Player:
1 2 3
| InputStream in = audioURL.openStream(); AudioDevice dev = FactoryRegistry.systemRegistry().createAudioDevice(); Player player = new Player(in, dev); |
But with that I can never get an AudioFormat out of it. So to sum it up, I think I may have gotten closer but it still doesn't work.
This is strange, it seems Flash can do short and long sounds beautifully in a web page, but I haven't heard of anyone managing it in a Java Applet. Surely Java isn't outdone by Flash is it? Hopefully help for me is on its way!