JMF capture to memory

J

janzon

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top