Link to home
Start Free TrialLog in
Avatar of TimYates
TimYatesFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Streaming audio from a servlet

Hi there...  

Say I have 10 audio files (the numbers 1 to 10 read out and saved as wav files);

What I want to do, is have a servlet that generates an audio stream of these files, dynamically added to the stream one after another indefinately (so the stream would appear to loop to the end user)

What are my best steps?  Does anyone have any sample code for these 2 distinct problems?

1)  Joining samples together on the fly
2)  Streaming this to multiple listeners from a servlet

I'm not sure if javasound will do, or if I will need JMF...and all of the JMF examples I have seen are on about "capturing streamed data" or streaming to another JMF application, not streaming to whatever tool the end client is using to listen to the stream (media player, winamp, xine, whatever)

So I was hoping someone out there would have some code/links/advice to give ;-)

Cheers,

Tim
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TimYates

ASKER

Unfortunately, saving the entire sample to disk isn't possible...

What I want is sort of like a "PI reader", so the sequence is incredibly long, I just want the server to stream out the next number in the sequence, increment the sequence pointer, then send the next one...

Sorry it has taken me so long to get back to this question...I didn't get an email about it... :-(

Tim
After a bit of scraping around (I just got the time to do it), I found this:

http://fluid.sourceforge.net/

Which *seems* to be an audio streamer in java...  (haven't had time to look at it yet)

It's used in the Streamsicle project http://streamsicle.com/ (which again, I haven't tried yet)

I just thought I'd post this for completeness, so anyone following or finding this question can see some sort of answer ;-)

Hehehe, I'll shut up and close this now :-)

Tim
:-)