List of usage examples for javax.sound.midi MidiDevice getTransmitters
List<Transmitter> getTransmitters();
From source file:de.ailis.midi4js.Midi4JS.java
/** * Returns all currently open transmitters. * * @param deviceHandle//from w w w .j a va2 s.c o m * The device handle. * @return All currently open transmitters in form of a JSON-encoded string * which describes an array of transmitter handles. * @throws JSONException * When JSON data could not be constructed. */ public String getTransmitters(final int deviceHandle) throws JSONException { final MidiDevice device = resolveDeviceHandle(deviceHandle); final JSONStringer json = new JSONStringer(); json.array(); for (final Transmitter transmitter : device.getTransmitters()) { json.value(System.identityHashCode(transmitter)); } json.endArray(); return json.toString(); }