Playing an Online mp3
- by Mohsen
I have a problem with playing online mp3s. I'm using latest version of javazoom's jlayer and basicplayer. Here is the exception:
Caused by: javazoom.jlgui.basicplayer.BasicPlayerException: java.io.EOFException
at javazoom.jlgui.basicplayer.BasicPlayer.initAudioInputStream(Unknown Source)
at javazoom.jlgui.basicplayer.BasicPlayer.open(Unknown Source)
... 12 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:375)
at com.sun.media.sound.WaveFileReader.getFMT(WaveFileReader.java:244)
at com.sun.media.sound.WaveFileReader.getAudioFileFormat(WaveFileReader.java:85)
at javax.sound.sampled.AudioSystem.getAudioFileFormat(AudioSystem.java:985)
at javazoom.jlgui.basicplayer.BasicPlayer.initAudioInputStream(Unknown Source)
... 15 more
My java is 1.6.0_16.
Certain files cannot be player through the Internet. I have a set of mp3s, playing one after the other. Randomly one mp3 doesn't work throwing above exception. Some mp3s can be played by calling again play() method if javazoom's basicplayer, but others can never be played online.
I was able to find this post but I doubt if this really relates to my directx version or something.
Mohsen