JMF capture to memory



Hi all

I have made one program that uses JMF to play a wave file, and on
program that uses JMF to capture audio from the microphone, storing it
in a wave file. Nice!

Now I want to glue this together, without using a file in between. It's
harder than I thought it would be.

To create a DataSink for storing the audio in a file, I use

DataSource source = processor.getDataOutput();
MediaLocator destination = new MediaLocator("file://foo.wav");

try {

dataSink = Manager.createDataSink(source, destination);

} catch ....

What do I need to do to direct the destination to a memory buffer
instead? MediaLocator doesn't seem to allow this. Nor are there any
other createDataSink methods that help me out, as far as I can see.

.