• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

audio stream via network

 
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, I know, where the mistake is: I have to enlarge the clients buffer size.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic