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
LVL 35
TimYatesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
Only a vague suggestion really - try using an audio format that is not proprietary, but open, and one that is supported by Windows. That way you've got a good chance of getting a library that will support concatenation
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jprgnCommented:
After capturing save it in appropriate format
e.g .avi or .wav , so any application that understands that format will automatically execute it.
0
TimYatesAuthor Commented:
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
0
TimYatesAuthor Commented:
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
0
CEHJCommented:
:-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.