views:

179

answers:

2

I am evaluating JavaFX for a project at work, but it appears that the platform does not support capturing audio using a microphone. I was under the impression that with JavaFX, one had access to "all of Java". If you can record using a microphone and an applet, why can't the same be accomplished using JavaFX? Are there workarounds to this limitation?

Thanks.

+1  A: 

There's no limitation - you are right in saying that it has access to "all of Java". Assuming that there is a microphone / sound capture API for Java, then you can just "call down" to it from JavaFX code.

JavaFX is essentially a DSL for GUIs. If you already have a well-designed applet which fits your requirement, then there should be no reason why the "view" component of the applet cannot be replaced with JavaFX.

Matthew Hegarty
A: 

You will need to use the JavaSound API from JavaFX.

Better yet create a set of Java class that captures the sound that you can call from FX.

Look at the AsyncTask inteface in JavaFX. Because JavaFX has no support for multithreading, you will need to write threaded code in Java. For example to simulate a RECORD and STOP button.

Hmmm I am assuming that you writing your code targeted for DESKTOP profile.

peter_pilgrim