APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.media.sound

public final Class SoftReceiver

extends Object
implements MidiDeviceReceiver
Class Inheritance
All Implemented Interfaces
javax.sound.midi.MidiDeviceReceiver, javax.sound.midi.Receiver, java.lang.AutoCloseable
Imports
java.util.TreeMap, javax.sound.midi.MidiDevice, .MidiDeviceReceiver, .MidiMessage, .ShortMessage

Software synthesizer MIDI receiver class.
Author
Karl Helgason

Field Summary

Modifier and TypeField and Description
private final Object
pack-priv SoftMainMixer
pack-priv TreeMap<Long, Object>
pack-priv boolean
private final SoftSynthesizer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements javax.sound.midi.Receiver.close.

Indicates that the application has finished using the receiver, and that limited resources it requires may be released or made available.

public MidiDevice
getMidiDevice()

Implements javax.sound.midi.MidiDeviceReceiver.getMidiDevice.

Obtains a MidiDevice object which is an owner of this Receiver.

public void
send(MidiMessage message, long timeStamp)

Implements javax.sound.midi.Receiver.send.

Sends a MIDI message and time-stamp to this receiver.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

control_mutexback to summary
private final Object control_mutex
mainmixerback to summary
pack-priv SoftMainMixer mainmixer
midimessagesback to summary
pack-priv TreeMap<Long, Object> midimessages
openback to summary
pack-priv boolean open
synthback to summary
private final SoftSynthesizer synth

Constructor Detail

SoftReceiverback to summary
public SoftReceiver(SoftSynthesizer synth)

Method Detail

closeback to summary
public void close()

Implements javax.sound.midi.Receiver.close.

Doc from javax.sound.midi.Receiver.close.

Indicates that the application has finished using the receiver, and that limited resources it requires may be released or made available.

If the creation of this Receiver resulted in implicitly opening the underlying device, the device is implicitly closed by this method. This is true unless the device is kept open by other Receiver or Transmitter instances that opened the device implicitly, and unless the device has been opened explicitly. If the device this Receiver is retrieved from is closed explicitly by calling MidiDevice.close, the Receiver is closed, too. For a detailed description of open/close behaviour see the class description of MidiDevice.

Annotations
@Override
getMidiDeviceback to summary
public MidiDevice getMidiDevice()

Implements javax.sound.midi.MidiDeviceReceiver.getMidiDevice.

Doc from javax.sound.midi.MidiDeviceReceiver.getMidiDevice.

Obtains a MidiDevice object which is an owner of this Receiver.

Annotations
@Override
sendback to summary
public void send(MidiMessage message, long timeStamp)

Implements javax.sound.midi.Receiver.send.

Doc from javax.sound.midi.Receiver.send.

Sends a MIDI message and time-stamp to this receiver. If time-stamping is not supported by this receiver, the time-stamp value should be -1.

Annotations
@Override