public List<Device> getDevices() throws PortAudioException { ArrayList<Device> devices = new ArrayList<Device>(); ByteBuffer data = PortAudio.getHostAPIsDevicesAsBuffer(id); data.order(ByteOrder.nativeOrder()); try { while (data.remaining() > 0) devices.add(new Device(data)); } finally { PortAudio.free(data); } return devices; }
public Device getDefaultOutputDevice() throws PortAudioException { return PortAudio.getDevice(defaultOutputDevice); }