how to integrate a JavaSound mixer or dataline with a JMF (Pull)DataSource?

My application is an RTP based phone, which works (it even has SIP signalling support). In addition to using the system microphone to hear what the user says and send it to the other phone, I want the user to be able to play a sound file and have the two mixed together into one stream to be sent to the other phone.

I've found a JavaSound based example progam that is able to mix two sound files together and play them back on my speakers, simultaneously in real-time. The program can be downloaded at http://www.jsresources.org/examples/MultiAudioStreamPlayer.html

I know JavaSound can record from a microphone and present that as a DataLine just like a file, so this JavaSound program should do what I want, except that I can't connect it to JMF/RTP because I don't know how to make it a DataSource.

I'm not very familar with JavaSound, so I in looking at this program (http://www.jsresources.org/examples/MultiAudioStreamPlayer.html), I don't see where the 2 AudioInputStreams it creates and reads from are connected to a mixer to be played out my speaker (though I know it works), maybe there is an implied system mixer that it goes to by default?

So, I don't even know if a have to connect a DataSource to a mixer (which I don't see) or a dataline.

Not that I know how to do either.

:) I would really appreciate it if someone could help figure out how I can connect a (Pull) DataSource to this JavaSound code, so I can connect it to the Processor I use to stream it

[1522 byte] By [question23a] at [2007-10-3 4:28:28]
# 1

for anyone that needs to know how to do this:

make an RTPManager for each file or microphone, etc... you want to send

then have the receiver make a JMF player for each stream it receives.

JMF (via JavaSound) will automatically mix the audio from all players.

it turns out this is really that hard (I didn't realize it until today b/c I put a lot of abstraction above my code that interfaces w/ RTPManager)

question23a at 2007-7-14 22:31:26 > top of Java-index,Security,Cryptography...
# 2
JMF (via JavaSound) will automatically mix the audio from all players....OK...But how do I capture the mixed output and stream it using RTP ?
ThiagoCa at 2007-7-14 22:31:26 > top of Java-index,Security,Cryptography...