Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 17 java.desktop.jmod - Desktop Module
JDK 17 java.desktop.jmod is the JMOD file for JDK 17 Desktop module.
JDK 17 Desktop module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\java.desktop.jmod.
JDK 17 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Desktop module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\java.desktop.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/media/sound/MidiOutDevice.java
/*
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.media.sound;
import javax.sound.midi.MidiMessage;
import javax.sound.midi.MidiUnavailableException;
import javax.sound.midi.Receiver;
import javax.sound.midi.ShortMessage;
/**
* MidiOutDevice class representing functionality of MidiOut devices.
*
* @author David Rivas
* @author Kara Kytle
* @author Florian Bomers
*/
final class MidiOutDevice extends AbstractMidiDevice {
MidiOutDevice(AbstractMidiDeviceProvider.Info info) {
super(info);
}
@Override
protected synchronized void implOpen() throws MidiUnavailableException {
int index = ((AbstractMidiDeviceProvider.Info)getDeviceInfo()).getIndex();
id = nOpen(index); // can throw MidiUnavailableException
if (id == 0) {
throw new MidiUnavailableException("Unable to open native device");
}
}
@Override
protected synchronized void implClose() {
// prevent further action
long oldId = id;
id = 0;
super.implClose();
// close the device
nClose(oldId);
}
@Override
public long getMicrosecondPosition() {
long timestamp = -1;
if (isOpen()) {
timestamp = nGetTimeStamp(id);
}
return timestamp;
}
/** Returns if this device supports Receivers.
This implementation always returns true.
@return true, if the device supports Receivers, false otherwise.
*/
@Override
protected boolean hasReceivers() {
return true;
}
@Override
protected Receiver createReceiver() {
return new MidiOutReceiver();
}
final class MidiOutReceiver extends AbstractReceiver {
@Override
void implSend(final MidiMessage message, final long timeStamp) {
final int length = message.getLength();
final int status = message.getStatus();
if (length <= 3 && status != 0xF0 && status != 0xF7) {
int packedMsg;
if (message instanceof ShortMessage) {
if (message instanceof FastShortMessage) {
packedMsg = ((FastShortMessage) message).getPackedMsg();
} else {
ShortMessage msg = (ShortMessage) message;
packedMsg = (status & 0xFF)
| ((msg.getData1() & 0xFF) << 8)
| ((msg.getData2() & 0xFF) << 16);
}
} else {
packedMsg = 0;
byte[] data = message.getMessage();
if (length>0) {
packedMsg = data[0] & 0xFF;
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;
}
packedMsg |= (data[1] & 0xFF) << 8;
if (length>2) {
packedMsg |= (data[2] & 0xFF) << 16;
}
}
}
}
nSendShortMessage(id, packedMsg, timeStamp);
} else {
final byte[] data;
if (message instanceof FastSysexMessage) {
data = ((FastSysexMessage) message).getReadOnlyMessage();
} else {
data = message.getMessage();
}
final int dataLength = Math.min(length, data.length);
if (dataLength > 0) {
nSendLongMessage(id, data, dataLength, timeStamp);
}
}
}
/** shortcut for the Sun implementation */
synchronized void sendPackedMidiMessage(int packedMsg, long timeStamp) {
if (isOpen() && id != 0) {
nSendShortMessage(id, packedMsg, timeStamp);
}
}
} // class MidiOutReceiver
private native long nOpen(int index) throws MidiUnavailableException;
private native void nClose(long id);
private native void nSendShortMessage(long id, int packedMsg, long timeStamp);
private native void nSendLongMessage(long id, byte[] data, int size, long timeStamp);
private native long nGetTimeStamp(long id);
} // class MidiOutDevice
⏎ com/sun/media/sound/MidiOutDevice.java
Or download all of them as a single archive file:
File name: java.desktop-17.0.5-src.zip File size: 9152233 bytes Release date: 2022-09-13 Download
⇒ JDK 17 java.instrument.jmod - Instrument Module
2023-09-16, ≈379🔥, 0💬
Popular Posts:
JDK 17 jdk.javadoc.jmod is the JMOD file for JDK 17 Java Document tool, which can be invoked by the ...
The Jakarta-ORO Java classes are a set of text-processing Java classes that provide Perl5 compatible...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
HttpComponents Client Source Code Files are provided in the source package file, httpcomponents-clie...
How to show the XML parsing flow with sax\DocumentTracer.java provided in the Apache Xerces package?...