-
Notifications
You must be signed in to change notification settings - Fork 26
Tags
mhroth edited this page Sep 13, 2010
·
7 revisions
Archives of the tagged releases can be found at the Downloads page.
The beta release currently constitutes everything written after the release of alpha. All driver management methods are in AsioDriver (there is no JAsioHost class as there was in alpha). A driver is canonically loaded with:
List<String> driverNameList = AsioDriver.getDriverNames();
AsioDriver asioDriver = AsioDriver.getDriver(driverNameList.get(0));
Set<AsioChannel> activeChannels = new HashSet<AsioChannel>();
activeChannels.add(asioDriver.getChannelOutput(0));
activeChannels.add(asioDriver.getChannelOutput(1));
asioDriver.createBuffers();
asioDriver.start();
try {
Thread.sleep(1000);
} catch (InterruptedException ie) {
ie.printStackTrace(System.err);
}
AsioDriver.shutdownAndUnloadDriver();
This release is outdated, but documented for completeness. Please use the most up-to-date release as available from the home page. This release has stable and reliable operation for all tested drivers. It consists of two primary classes, JAsioHost and AsioDriver. The former contains only static methods which manage the loading and unloading of drivers. The following is a template to load an AsioDriver:
List<String> driverNameList = JAsioHost.getDriverNames();
AsioDriver asioDriver = JAsioHost.getAsioDriver(driverNameList.get(0));
asioDriver.openControlPanel(); // may not work for all drivers on all platforms
Set<AsioChannelInfo> activeChannels = new HashSet<AsioChannelInfo>();
activeChannels.add(asioDriver.getChannelInfoOutput(0));
activeChannels.add(asioDriver.getChannelInfoOutput(1));
asioDriver.createBuffers(activeChannels);
asioDriver.start();
try {
Thread.sleep(1000);
} catch (InterruptedException ie) {
ie.printStackTrace(System.err);
}
JAsioHost.shutdownAndUnloadDriver();
There are two major bugs:
- Do not try to load multiple drivers in succession. The most current one will eventually be unloaded once the old
AsioDriverobject is garbage collected. - Access JAsioHost methods from only one thread (I’m looking at you, AWT thread).