Hello,
I wrote a
Applet embedded in a web page.
This Applet have a "play" button to play audio files (wav).
The audio files are stored in directory of the servers Host.
I use the Java-Sound-API with its
SourceDataLine-Interface to buffer the sound and transmit it via URL through the client which invokes the play button of the applet.
All works, but the streaming is not so good (The sound stutters and hangs very often).
I used this method to buffer the audio data to the stream:
I have also tried it with the code of
http://www.java2s.com/Code/Java/Development-Class/PlayssoundsstreamingfromaURL.htm.
But it has the same effect.
Look at this applet:
http://www.javazoom.net/applets/jlguiapplet/jlguiapplet.html
The player works very well - it streams the audio data correctly. However, it streams mp3-files. I want to stream wav-files.
Maybe I can use the new features of NIO-API to stream faster or something else. But I have no clue.
How can I solve that?