Add jjack.jar
to the classpath, and copy the native library file libjjack.so
to your system's library path.
That's all, loading of the driver is done transparently by the Java virtual machine.
JJack may be exactly what you are looking for. It provides an
interface between the JACK
Audio Connection Kit and the Java
programming language to
make JACK's main features available from inside the Java virtual
machine. As JACK
is a professional audio system available for multiple platforms and
OSs, Java is an attractive
language for writing cross-platform clients for JACK. (The current
version
of JJack contains a Linux-version of the bridge library libjjack.so
only, but compiling it for other systems should be possible.)
Not necessarily. JJack uses some performance hints to be efficient, the
most important to mention is the use of direct ByteBuffers (see
java.nio.ByteBuffer
)
to handle data exchange with the JACK daemon. Besides that, if a
program does a lot of numeric calculation witthout any other
interaction, there is a good chance that a just-in-time compiler will
create efficient code from the Java byte code.
Try increasing the stack size for the Java virtual machine using the -Xss
switch, e.g. -Xss64m
.
It is not tested yet. But if you know how to compile libjjack.c
to run on Macs, give it a try and please let me know how you did it.