Bill Stewart posted the following in 2002:
--------------
You can use AudioUnits with Java. We haven't made any comments about creating an audio unti with Java. It would be possible, but I'd have to be seriously concerned about the wisdom of doing this. If you have to do signal processing in Java, then you're best to hook up your result with a render callback to an existing audio unit, and do your DSP there. (You can also call the AudioUnitRender of an upstream audio unit from here if you need to obtain audio data from another unit in order to do your processing).
If you wanted to you could take the AudioUnit base classes in the SDK, and write an audio unit base class that instantiates a Java VM, calls into some Java Interface to do the work, etc... Kind of like the way the effect class extends the AUBase class... Then in C you can handle the basic AU stuff, and just call out to java when you need to (and in the process provide a nice java like API)
Bill
---------------
I want to answer his question and ask again how to use Java. I have a sophisticated click-removal program written and stable in Java, and I want to re-use the several thousand lines of computational code in an Audio Unit. Translating to C++ is not rocket science, but it would be better to keep a common code base. And Java is supposed to be a first-rate citizen on Mac OS X.
Apple state "Because the Java API so closely follows the C API, ... the language choice is up to you, depending upon your development needs and requirements". But my attempts to extend the Java CoreAudio class are thwarted by the fact that the constructors are private.
Final comment - if I am forced to use C++ then the Steinberg VST framework is an obvious competitor. And it will be OK on Windows too. Surely that's not what apple really want to push??
|