Example usage for javax.sound.midi Transmitter getReceiver

List of usage examples for javax.sound.midi Transmitter getReceiver

Introduction

In this page you can find the example usage for javax.sound.midi Transmitter getReceiver.

Prototype

Receiver getReceiver();

Source Link

Document

Obtains the current receiver to which this transmitter will deliver MIDI messages.

Usage

From source file:de.ailis.midi4js.Midi4JS.java

/**
 * Returns the handle of the receiver which is connected with the
 * specified transmitter.//from   w w  w .  jav  a2s .com
 *
 * @param transmitterHandle
 *            The handle of the transmitter.
 * @return The handle of the receiver or 0 if none.
 */
public int getTransmitterReceiver(final int transmitterHandle) {
    final Transmitter transmitter = resolveTransmitterHandle(transmitterHandle);
    final Receiver receiver = transmitter.getReceiver();
    return System.identityHashCode(receiver);
}