Example #1
0
  private void loadAsioDriver() {

    /* load the driver */
    try {
      /*
      https://github.com/mhroth/jasiohost
      */
      // System.out.println(AsioDriver.getDriverNames());
      driver = AsioDriver.getDriver("ASIO PreSonus FireStudio");
      listener = new AsioSoundHost(driver);
      driver.start();
      driverLoaded = true;
      System.out.println("loaded.");
      // System.out.println(driver.getNumChannelsInput());
      System.out.println(driver.getNumChannelsOutput());
      // System.out.println(driver.getName());
      // System.out.println(driver.getCurrentState());

    } catch (UnsatisfiedLinkError e) {
      System.out.println("Please install the Following Driver: ASIO PreSonus FireStudio");
      JOptionPane.showMessageDialog(
          null, "Please install the Following Driver: ASIO PreSonus FireStudio");
      driverLoaded = false;
    } catch (com.synthbot.jasiohost.AsioException err) {
      System.out.println("Output Device not found: Please connect the Asio device");
      JOptionPane.showMessageDialog(
          null, "Output Device not found: Please connect the Asio device");
      driverLoaded = false;
    }
  }