Skip to content
mhroth edited this page Sep 13, 2010 · 19 revisions

Welcome to the JAsioHost wiki!

About

JAsioHost is released under the Lesser Gnu Public License (LGPL).


Getting Started

First you will need to put JAsioHost.jar in your classpath and jasiohost.dll into C:\WINDOWS\system32. The basic design pattern for using JAsioHost is written below. static methods in JAsioHost are used to collect information about the available drivers. getAsioDriver is called in order to load and instantiate a given driver. The AsioDriver can then be queried for channel state information. Audio buffers are created using createBuffers, before start is called. Callbacks are made from the driver in order to submit input and retrieve output. Always remember to call JAsioHost.shutdownAndUnloadDriver() before exiting the program. Your system may crash if you do not.


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.getBufferPreferredSize());
asioDriver.start();
try {
  Thread.sleep(1000);
} catch (InterruptedException ie) {
  ie.printStackTrace(System.err);
}
JAsioHost.shutdownAndUnloadDriver();


Contact

My name is Martin Roth. I am the author of JAsioHost. Please feel free to contact me with any questions or comments at [email protected].

Clone this wiki locally