import java.util.*; import java.util.zip.*; import java.util.List; import java.util.regex.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import java.util.concurrent.locks.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.text.*; import javax.swing.table.*; import java.io.*; import java.net.*; import java.lang.reflect.*; import java.lang.ref.*; import java.lang.management.*; import java.security.*; import java.security.spec.*; import java.awt.*; import java.awt.event.*; import java.awt.image.*; import javax.imageio.*; import java.math.*; import org.jaudiolibs.audioservers.AudioServerProvider; import java.util.ServiceLoader; import org.jaudiolibs.audioservers.ext.Device; class main { // JACK // JavaSound // JNA /** * * @author Neil C Smith */ public static void main(final String[] args) throws Exception { fixContextClassLoader(); for (AudioServerProvider provider : ServiceLoader.load(AudioServerProvider.class)) { System.out.println("Found library : " + provider.getLibraryName()); System.out.println("=============================================="); System.out.println("Devices"); System.out.println("----------------------------------------------"); for (Device dev : provider.findAll(Device.class)) { System.out.println(dev.getName() + " (inputs: " + dev.getMaxInputChannels() + ", outputs: " + dev.getMaxOutputChannels() + ")"); } } } static Map _registerThread_threads = Collections.synchronizedMap(new WeakHashMap()); static Thread _registerThread(Thread t) { _registerThread_threads.put(t, true); return t; } static void _registerThread() { _registerThread(Thread.currentThread()); } static void fixContextClassLoader() { Thread.currentThread().setContextClassLoader(myClassLoader()); } static ClassLoader myClassLoader() { return _getClass(mc()).getClassLoader(); } static Class mc() { return main.class; } static Class _getClass(String name) { try { return Class.forName(name); } catch (ClassNotFoundException e) { return null; // could optimize this } } static Class _getClass(Object o) { return o == null ? null : o instanceof Class ? (Class) o : o.getClass(); } static Class _getClass(Object realm, String name) { try { return getClass(realm).getClassLoader().loadClass(classNameToVM(name)); } catch (Exception __e) { throw rethrow(__e); } } static Class getClass(String name) { try { return Class.forName(name); } catch (ClassNotFoundException e) { return null; } } static Class getClass(Object o) { return o instanceof Class ? (Class) o : o.getClass(); } static Class getClass(Object realm, String name) { try { try { return getClass(realm).getClassLoader().loadClass(classNameToVM(name)); } catch (ClassNotFoundException e) { return null; } } catch (Exception __e) { throw rethrow(__e); } } static String classNameToVM(String name) { return name.replace(".", "$"); } static RuntimeException rethrow(Throwable e) { throw asRuntimeException(e); } static RuntimeException asRuntimeException(Throwable t) { return t instanceof RuntimeException ? (RuntimeException) t : new RuntimeException(t); } }