/*
* 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.
*/
/*****************************************************************************/
/*
** Native functions for interfacing Java with the native implementation
** of PlatformMidi.h's functions.
*/
/*****************************************************************************/
#define USE_ERROR
#define USE_TRACE
#include <jni.h>
#include "SoundDefs.h"
#include "PlatformMidi.h"
#include "Utilities.h"
#include "com_sun_media_sound_MidiOutDevice.h"
// NATIVE METHODS
#if USE_PLATFORM_MIDI_OUT == TRUE
#endif
// if we didn't get a valid handle, throw a MidiUnavailableException
if (!deviceHandle) {
ERROR0("Java_com_sun_media_sound_MidiOutDevice_nOpen:");
} else {
TRACE0("Java_com_sun_media_sound_MidiOutDevice_nOpen succeeded\n");
}
}
TRACE0("Java_com_sun_media_sound_MidiOutDevice_nClose.\n");
#if USE_PLATFORM_MIDI_OUT == TRUE
#endif
TRACE0("Java_com_sun_media_sound_MidiOutDevice_nClose succeeded\n");
}
Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp(JNIEnv* e, jobject thisObj, jlong deviceHandle) {
TRACE0("Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp.\n");
#if USE_PLATFORM_MIDI_OUT == TRUE
#endif
/* Handle error codes. */
if (ret < -1) {
ERROR1("Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp: MIDI_IN_GetTimeStamp returned %lld\n", ret);
ret = -1;
}
return ret;
}
Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage(JNIEnv* e, jobject thisObj, jlong deviceHandle,
TRACE0("Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage.\n");
#if USE_PLATFORM_MIDI_OUT == TRUE
#endif
TRACE0("Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage succeeded\n");
}
Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage(JNIEnv* e, jobject thisObj, jlong deviceHandle,
#if USE_PLATFORM_MIDI_OUT == TRUE
#endif
TRACE0("Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage.\n");
#if USE_PLATFORM_MIDI_OUT == TRUE
if (!data) {
ERROR0("MidiOutDevice: Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage: could not get array elements\n");
return;
}
/* "continuation" sysex messages start with F7 (instead of F0), but
are sent without the F7. */
if (data[0] == 0xF7) {
data++;
size--;
}
// release the byte array
#endif
TRACE0("Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage succeeded\n");
}