/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* MidiOutDevice class representing functionality of MidiOut devices.
*
* @author David Rivas
* @author Kara Kytle
* @author Florian Bomers
*/
// CONSTRUCTOR
super(info);
}
// IMPLEMENTATION OF ABSTRACT MIDI DEVICE METHODS
if (id == 0) {
throw new MidiUnavailableException("Unable to open native device");
}
}
protected synchronized void implClose() {
// prevent further action
id = 0;
super.implClose();
// close the device
}
public long getMicrosecondPosition() {
long timestamp = -1;
if (isOpen()) {
}
return timestamp;
}
// OVERRIDES OF ABSTRACT MIDI DEVICE METHODS
/** Returns if this device supports Receivers.
This implementation always returns true.
@return true, if the device supports Receivers, false otherwise.
*/
protected boolean hasReceivers() {
return true;
}
return new MidiOutReceiver();
}
// INNER CLASSES
int packedMsg;
if (message instanceof ShortMessage) {
if (message instanceof FastShortMessage) {
} else {
}
} else {
packedMsg = 0;
if (length>0) {
if (length>1) {
/* We handle meta messages here. The message
system reset (FF) doesn't get until here,
because it's length is only 1. So if we see
a status byte of FF, it's sure that we
have a Meta message. */
if (status == 0xFF) {
return;
}
if (length>2) {
}
}
}
}
} else {
final byte[] data;
if (message instanceof FastSysexMessage) {
} else {
}
if (dataLength > 0) {
}
}
}
/** shortcut for the Sun implementation */
}
}
} // class MidiOutReceiver
// NATIVE METHODS
} // class MidiOutDevice