-
-
Save atsushieno/6ecdb6564947bdb7c88deb0557d47172 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE | |
#ifdef _WIN32 | |
#define _JAVASOFT_JNI_MD_H_ | |
#define JNIEXPORT __declspec(dllexport) | |
#define JNIIMPORT __declspec(dllimport) | |
#define JNICALL __stdcall | |
typedef int jint; | |
typedef long long jlong; | |
typedef signed char jbyte; | |
#elif defined(__GNUC__) && !defined(__ANDROID__) | |
#define _JAVASOFT_JNI_MD_H_ | |
#define JNIEXPORT __attribute__((visibility("default"))) | |
#define JNIIMPORT | |
#define JNICALL | |
typedef int jint; | |
typedef long long jlong; | |
typedef signed char jbyte; | |
#endif | |
#include <jni.h> | |
#ifdef __ANDROID__ | |
#include <android/log.h> | |
#elif defined(__APPLE__) && defined(__OBJC__) | |
#include <TargetConditionals.h> | |
#include <Foundation/Foundation.h> | |
#elif defined(__APPLE__) | |
#include <TargetConditionals.h> | |
#endif | |
#ifdef __linux__ | |
#include <malloc.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <sys/syscall.h> | |
#include <sys/sysinfo.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <dlfcn.h> | |
#include <link.h> | |
#include <pthread.h> | |
#elif defined(__APPLE__) | |
#include <sys/types.h> | |
#include <sys/sysctl.h> | |
#include <mach/mach_init.h> | |
#include <mach/mach_host.h> | |
#include <mach/task.h> | |
#include <unistd.h> | |
#include <dlfcn.h> | |
#include <mach-o/dyld.h> | |
#include <pthread.h> | |
#elif defined(_WIN32) && !defined(NO_WINDOWS_H) | |
#define NOMINMAX | |
#include <windows.h> | |
#include <psapi.h> | |
#elif defined(_WIN32) | |
extern "C" unsigned long __stdcall GetCurrentThreadId(); | |
#endif | |
#if defined(__ANDROID__) || TARGET_OS_IPHONE | |
#define NewWeakGlobalRef(obj) NewGlobalRef(obj) | |
#define DeleteWeakGlobalRef(obj) DeleteGlobalRef(obj) | |
#endif | |
#include <limits.h> | |
#include <stddef.h> | |
#ifndef _WIN32 | |
#include <stdint.h> | |
#endif | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <exception> | |
#include <memory> | |
#include <new> | |
#define jlong_to_ptr(a) ((void*)(uintptr_t)(a)) | |
#define ptr_to_jlong(a) ((jlong)(uintptr_t)(a)) | |
#if defined(_MSC_VER) | |
#define JavaCPP_noinline __declspec(noinline) | |
#define JavaCPP_hidden /* hidden by default */ | |
#elif defined(__GNUC__) | |
#define JavaCPP_noinline __attribute__((noinline)) __attribute__ ((unused)) | |
#define JavaCPP_hidden __attribute__((visibility("hidden"))) __attribute__ ((unused)) | |
#else | |
#define JavaCPP_noinline | |
#define JavaCPP_hidden | |
#endif | |
#if __cplusplus >= 201103L || _MSC_VER >= 1900 | |
#define JavaCPP_override override | |
#else | |
#define JavaCPP_override | |
#endif | |
#include <libremidi/libremidi-c.h> | |
static JavaVM* JavaCPP_vm = NULL; | |
static bool JavaCPP_haveAllocObject = false; | |
static bool JavaCPP_haveNonvirtual = false; | |
static const char* JavaCPP_classNames[21] = { | |
"org/bytedeco/javacpp/Pointer", | |
"java/lang/String", | |
"org/bytedeco/javacpp/Pointer$NativeDeallocator", | |
"org/bytedeco/javacpp/Loader", | |
"java/nio/Buffer", | |
"java/lang/Object", | |
"java/nio/charset/Charset", | |
"java/lang/NullPointerException", | |
"java/lang/RuntimeException", | |
"dev/atsushieno/libremidi_javacpp/libremidi_midi_in_port", | |
"dev/atsushieno/libremidi_javacpp/Arg2_Pointer_libremidi_midi_in_port", | |
"dev/atsushieno/libremidi_javacpp/libremidi_midi_out_port", | |
"dev/atsushieno/libremidi_javacpp/Arg2_Pointer_libremidi_midi_out_port", | |
"dev/atsushieno/libremidi_javacpp/libremidi_api_configuration", | |
"dev/atsushieno/libremidi_javacpp/libremidi_midi_configuration$Callback_Pointer_long", | |
"org/bytedeco/javacpp/IntPointer", | |
"dev/atsushieno/libremidi_javacpp/libremidi_midi_configuration$Callback_Pointer_IntPointer_long", | |
"org/bytedeco/javacpp/BytePointer", | |
"dev/atsushieno/libremidi_javacpp/libremidi_midi_configuration$Callback_Pointer_BytePointer_long", | |
"dev/atsushieno/libremidi_javacpp/libremidi_midi_configuration", | |
"dev/atsushieno/libremidi_javacpp/libremidi_observer_configuration" }; | |
static jclass JavaCPP_classes[21] = { NULL }; | |
static jfieldID JavaCPP_addressFID = NULL; | |
static jfieldID JavaCPP_positionFID = NULL; | |
static jfieldID JavaCPP_limitFID = NULL; | |
static jfieldID JavaCPP_capacityFID = NULL; | |
static jfieldID JavaCPP_deallocatorFID = NULL; | |
static jfieldID JavaCPP_ownerAddressFID = NULL; | |
static jmethodID JavaCPP_initMID = NULL; | |
static jmethodID JavaCPP_arrayMID = NULL; | |
static jmethodID JavaCPP_arrayOffsetMID = NULL; | |
static jfieldID JavaCPP_bufferPositionFID = NULL; | |
static jfieldID JavaCPP_bufferLimitFID = NULL; | |
static jfieldID JavaCPP_bufferCapacityFID = NULL; | |
static jmethodID JavaCPP_stringMID = NULL; | |
static jmethodID JavaCPP_getBytesMID = NULL; | |
static jmethodID JavaCPP_toStringMID = NULL; | |
#ifdef STRING_BYTES_CHARSET | |
#ifdef MODIFIED_UTF8_STRING | |
#pragma message ("warning: STRING_BYTES_CHARSET and MODIFIED_UTF8_STRING are mutually exclusive.") | |
#endif | |
static jobject JavaCPP_stringBytesCharset = NULL; | |
static jmethodID JavaCPP_stringWithCharsetMID = NULL; | |
static jmethodID JavaCPP_getBytesWithCharsetMID = NULL; | |
#endif | |
static inline void JavaCPP_log(const char* fmt, ...) { | |
va_list ap; | |
va_start(ap, fmt); | |
#ifdef __ANDROID__ | |
__android_log_vprint(ANDROID_LOG_ERROR, "javacpp", fmt, ap); | |
#elif defined(__APPLE__) && defined(__OBJC__) | |
NSLogv([NSString stringWithUTF8String:fmt], ap); | |
#else | |
vfprintf(stderr, fmt, ap); | |
fprintf(stderr, "\n"); | |
fflush(stderr); | |
#endif | |
va_end(ap); | |
} | |
#if !defined(NO_JNI_DETACH_THREAD) && defined(_WIN32) | |
#if __cplusplus >= 201103L || _MSC_VER >= 1900 | |
static thread_local | |
#else | |
static __declspec(thread) | |
#endif | |
struct JavaCPP_thread_local { | |
JNIEnv* env = NULL; | |
~JavaCPP_thread_local() { | |
if (env && JavaCPP_vm) { | |
JavaCPP_vm->DetachCurrentThread(); | |
} | |
} | |
} JavaCPP_thread_local; | |
#elif !defined(NO_JNI_DETACH_THREAD) && (defined(__linux__) || defined(__APPLE__)) | |
static pthread_key_t JavaCPP_current_env; | |
static JavaCPP_noinline void JavaCPP_detach_env(void *data) { | |
if (JavaCPP_vm) { | |
JavaCPP_vm->DetachCurrentThread(); | |
} | |
} | |
static JavaCPP_noinline void JavaCPP_create_pthread_key(void) { | |
pthread_key_create(&JavaCPP_current_env, JavaCPP_detach_env); | |
} | |
#endif | |
static JavaCPP_noinline jclass JavaCPP_getClass(JNIEnv* env, int i) { | |
if (JavaCPP_classes[i] == NULL && env->PushLocalFrame(1) == 0) { | |
jclass cls = env->FindClass(JavaCPP_classNames[i]); | |
if (cls == NULL || env->ExceptionCheck()) { | |
JavaCPP_log("Error loading class %s.", JavaCPP_classNames[i]); | |
return NULL; | |
} | |
JavaCPP_classes[i] = (jclass)env->NewWeakGlobalRef(cls); | |
if (JavaCPP_classes[i] == NULL || env->ExceptionCheck()) { | |
JavaCPP_log("Error creating global reference of class %s.", JavaCPP_classNames[i]); | |
return NULL; | |
} | |
env->PopLocalFrame(NULL); | |
} | |
return JavaCPP_classes[i]; | |
} | |
static JavaCPP_noinline jfieldID JavaCPP_getFieldID(JNIEnv* env, int i, const char* name, const char* sig) { | |
jclass cls = JavaCPP_getClass(env, i); | |
if (cls == NULL) { | |
return NULL; | |
} | |
jfieldID fid = env->GetFieldID(cls, name, sig); | |
if (fid == NULL || env->ExceptionCheck()) { | |
JavaCPP_log("Error getting field ID of %s/%s", JavaCPP_classNames[i], name); | |
return NULL; | |
} | |
return fid; | |
} | |
static JavaCPP_noinline jmethodID JavaCPP_getMethodID(JNIEnv* env, int i, const char* name, const char* sig) { | |
jclass cls = JavaCPP_getClass(env, i); | |
if (cls == NULL) { | |
return NULL; | |
} | |
jmethodID mid = env->GetMethodID(cls, name, sig); | |
if (mid == NULL || env->ExceptionCheck()) { | |
JavaCPP_log("Error getting method ID of %s/%s", JavaCPP_classNames[i], name); | |
return NULL; | |
} | |
return mid; | |
} | |
static JavaCPP_noinline jmethodID JavaCPP_getStaticMethodID(JNIEnv* env, int i, const char* name, const char* sig) { | |
jclass cls = JavaCPP_getClass(env, i); | |
if (cls == NULL) { | |
return NULL; | |
} | |
jmethodID mid = env->GetStaticMethodID(cls, name, sig); | |
if (mid == NULL || env->ExceptionCheck()) { | |
JavaCPP_log("Error getting static method ID of %s/%s", JavaCPP_classNames[i], name); | |
return NULL; | |
} | |
return mid; | |
} | |
static JavaCPP_noinline jobject JavaCPP_createPointer(JNIEnv* env, int i, jclass cls = NULL) { | |
if (cls == NULL && (cls = JavaCPP_getClass(env, i)) == NULL) { | |
return NULL; | |
} | |
if (JavaCPP_haveAllocObject) { | |
return env->AllocObject(cls); | |
} else { | |
jmethodID mid = env->GetMethodID(cls, "<init>", "(Lorg/bytedeco/javacpp/Pointer;)V"); | |
if (mid == NULL || env->ExceptionCheck()) { | |
JavaCPP_log("Error getting Pointer constructor of %s, while VM does not support AllocObject()", JavaCPP_classNames[i]); | |
return NULL; | |
} | |
return env->NewObject(cls, mid, NULL); | |
} | |
} | |
static JavaCPP_noinline void JavaCPP_initPointer(JNIEnv* env, jobject obj, const void* ptr, jlong size, void* owner, void (*deallocator)(void*)) { | |
if (owner != NULL && deallocator != NULL) { | |
jvalue args[4]; | |
args[0].j = ptr_to_jlong(ptr); | |
args[1].j = size; | |
args[2].j = ptr_to_jlong(owner); | |
args[3].j = ptr_to_jlong(deallocator); | |
if (JavaCPP_haveNonvirtual) { | |
env->CallNonvirtualVoidMethodA(obj, JavaCPP_getClass(env, 0), JavaCPP_initMID, args); | |
} else { | |
env->CallVoidMethodA(obj, JavaCPP_initMID, args); | |
} | |
} else { | |
env->SetLongField(obj, JavaCPP_addressFID, ptr_to_jlong(ptr)); | |
env->SetLongField(obj, JavaCPP_limitFID, (jlong)size); | |
env->SetLongField(obj, JavaCPP_capacityFID, (jlong)size); | |
} | |
} | |
#include <string> | |
static JavaCPP_noinline jstring JavaCPP_createStringFromBytes(JNIEnv* env, const char* ptr, size_t length) { | |
if (ptr == NULL) { | |
return NULL; | |
} | |
#ifdef MODIFIED_UTF8_STRING | |
return env->NewStringUTF(ptr); | |
#else | |
jbyteArray bytes = env->NewByteArray(length < INT_MAX ? length : INT_MAX); | |
env->SetByteArrayRegion(bytes, 0, length < INT_MAX ? length : INT_MAX, (signed char*)ptr); | |
#ifdef STRING_BYTES_CHARSET | |
jstring s = (jstring)env->NewObject(JavaCPP_getClass(env, 1), JavaCPP_stringWithCharsetMID, bytes, JavaCPP_stringBytesCharset); | |
#else | |
jstring s = (jstring)env->NewObject(JavaCPP_getClass(env, 1), JavaCPP_stringMID, bytes); | |
#endif // STRING_BYTES_CHARSET | |
env->DeleteLocalRef(bytes); | |
return s; | |
#endif // MODIFIED_UTF8_STRING | |
} | |
static JavaCPP_noinline jstring JavaCPP_createStringFromBytes(JNIEnv* env, const char* ptr) { | |
if (ptr == NULL) { | |
return NULL; | |
} | |
return JavaCPP_createStringFromBytes(env, ptr, std::char_traits<char>::length(ptr)); | |
} | |
static JavaCPP_noinline jstring JavaCPP_createStringFromUTF16(JNIEnv* env, const unsigned short* ptr, size_t length) { | |
if (ptr == NULL) { | |
return NULL; | |
} | |
return env->NewString(ptr, length); | |
} | |
static JavaCPP_noinline jstring JavaCPP_createStringFromUTF16(JNIEnv* env, const unsigned short* ptr) { | |
if (ptr == NULL) { | |
return NULL; | |
} | |
return JavaCPP_createStringFromUTF16(env, ptr, std::char_traits<unsigned short>::length(ptr)); | |
} | |
static JavaCPP_noinline const char* JavaCPP_getStringBytes(JNIEnv* env, jstring str) { | |
if (str == NULL) { | |
return NULL; | |
} | |
#ifdef MODIFIED_UTF8_STRING | |
return env->GetStringUTFChars(str, NULL); | |
#else | |
#ifdef STRING_BYTES_CHARSET | |
jbyteArray bytes = (jbyteArray)env->CallObjectMethod(str, JavaCPP_getBytesWithCharsetMID, JavaCPP_stringBytesCharset); | |
#else | |
jbyteArray bytes = (jbyteArray)env->CallObjectMethod(str, JavaCPP_getBytesMID); | |
#endif // STRING_BYTES_CHARSET | |
if (bytes == NULL || env->ExceptionCheck()) { | |
JavaCPP_log("Error getting bytes from string."); | |
return NULL; | |
} | |
jsize length = env->GetArrayLength(bytes); | |
signed char* ptr = new (std::nothrow) signed char[length + 1]; | |
if (ptr != NULL) { | |
env->GetByteArrayRegion(bytes, 0, length, ptr); | |
ptr[length] = 0; | |
} | |
return (const char*)ptr; | |
#endif // MODIFIED_UTF8_STRING | |
} | |
static JavaCPP_noinline void JavaCPP_releaseStringBytes(JNIEnv* env, jstring str, const char* ptr) { | |
#ifdef MODIFIED_UTF8_STRING | |
if (str != NULL && ptr != NULL) { | |
env->ReleaseStringUTFChars(str, ptr); | |
} | |
#else | |
delete[] ptr; | |
#endif | |
} | |
static JavaCPP_noinline const unsigned short* JavaCPP_getStringUTF16(JNIEnv* env, jstring str) { | |
if (str == NULL) { | |
return NULL; | |
} | |
const jsize length = env->GetStringLength(str); | |
unsigned short* ptr = new (std::nothrow) unsigned short[length + 1]; | |
if (ptr != NULL) { | |
env->GetStringRegion(str, 0, length, ptr); | |
ptr[length] = 0; | |
} | |
return ptr; | |
} | |
static JavaCPP_noinline void JavaCPP_releaseStringUTF16(JNIEnv*, const unsigned short* ptr) { | |
delete[] ptr; | |
} | |
class JavaCPP_hidden JavaCPP_exception : public std::exception { | |
public: | |
JavaCPP_exception(const char* str) throw() { | |
if (str == NULL) { | |
strcpy(msg, "Unknown exception."); | |
} else { | |
strncpy(msg, str, sizeof(msg)); | |
msg[sizeof(msg) - 1] = 0; | |
} | |
} | |
virtual const char* what() const throw() { return msg; } | |
char msg[1024]; | |
}; | |
#ifndef GENERIC_EXCEPTION_CLASS | |
#define GENERIC_EXCEPTION_CLASS std::exception | |
#endif | |
#ifndef GENERIC_EXCEPTION_TOSTRING | |
#define GENERIC_EXCEPTION_TOSTRING what() | |
#endif | |
static JavaCPP_noinline jthrowable JavaCPP_handleException(JNIEnv* env, int i) { | |
jstring str = NULL; | |
try { | |
throw; | |
} catch (GENERIC_EXCEPTION_CLASS& e) { | |
str = JavaCPP_createStringFromBytes(env, e.GENERIC_EXCEPTION_TOSTRING); | |
} catch (...) { | |
str = JavaCPP_createStringFromBytes(env, "Unknown exception."); | |
} | |
jmethodID mid = JavaCPP_getMethodID(env, i, "<init>", "(Ljava/lang/String;)V"); | |
if (mid == NULL) { | |
return NULL; | |
} | |
return (jthrowable)env->NewObject(JavaCPP_getClass(env, i), mid, str); | |
} | |
#if !defined(NO_JNI_DETACH_THREAD) && (defined(__linux__) || defined(__APPLE__)) | |
static pthread_once_t JavaCPP_once = PTHREAD_ONCE_INIT; | |
#endif | |
static JavaCPP_noinline void JavaCPP_detach(bool detach) { | |
#if !defined(NO_JNI_DETACH_THREAD) && !defined(__linux__) && !defined(__APPLE__) && !defined(_WIN32) | |
if (detach && JavaCPP_vm->DetachCurrentThread() != JNI_OK) { | |
JavaCPP_log("Could not detach the JavaVM from the current thread."); | |
} | |
#endif | |
} | |
static JavaCPP_noinline bool JavaCPP_getEnv(JNIEnv** env) { | |
bool attached = false; | |
JavaVM *vm = JavaCPP_vm; | |
if (vm == NULL) { | |
JavaCPP_log("Could not get any created JavaVM."); | |
*env = NULL; | |
return false; | |
} | |
#if !defined(NO_JNI_DETACH_THREAD) && defined(_WIN32) | |
if ((*env = JavaCPP_thread_local.env) != NULL) { | |
attached = true; | |
goto done; | |
} | |
#elif !defined(NO_JNI_DETACH_THREAD) && (defined(__linux__) || defined(__APPLE__)) | |
pthread_once(&JavaCPP_once, JavaCPP_create_pthread_key); | |
if ((*env = (JNIEnv *)pthread_getspecific(JavaCPP_current_env)) != NULL) { | |
attached = true; | |
goto done; | |
} | |
#endif | |
if (vm->GetEnv((void**)env, JNI_VERSION_1_6) != JNI_OK) { | |
struct { | |
JNIEnv **env; | |
operator JNIEnv**() { return env; } // Android JNI | |
operator void**() { return (void**)env; } // standard JNI | |
} env2 = { env }; | |
JavaVMAttachArgs args; | |
args.version = JNI_VERSION_1_6; | |
args.group = NULL; | |
char name[64] = {0}; | |
#ifdef _WIN32 | |
sprintf(name, "JavaCPP Thread ID %lu", GetCurrentThreadId()); | |
#elif defined(__APPLE__) | |
sprintf(name, "JavaCPP Thread ID %u", pthread_mach_thread_np(pthread_self())); | |
#elif defined(__linux__) | |
sprintf(name, "JavaCPP Thread ID %ld", syscall(SYS_gettid)); | |
#endif | |
args.name = name; | |
if (vm->AttachCurrentThreadAsDaemon(env2, &args) != JNI_OK) { | |
JavaCPP_log("Could not attach the JavaVM to the current thread."); | |
*env = NULL; | |
goto done; | |
} | |
#if !defined(NO_JNI_DETACH_THREAD) && defined(_WIN32) | |
JavaCPP_thread_local.env = *env; | |
#elif !defined(NO_JNI_DETACH_THREAD) && (defined(__linux__) || defined(__APPLE__)) | |
pthread_setspecific(JavaCPP_current_env, *env); | |
#endif | |
attached = true; | |
} | |
if (JavaCPP_vm == NULL) { | |
if (JNI_OnLoad(vm, NULL) < 0) { | |
JavaCPP_detach(attached); | |
*env = NULL; | |
goto done; | |
} | |
} | |
done: | |
return attached; | |
} | |
struct JavaCPP_hidden JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port() : ptr(NULL), obj(NULL) { } | |
void operator()(void* arg0, const libremidi_midi_in_port* arg1); | |
void (*ptr)(void* arg0, const libremidi_midi_in_port* arg1); | |
jobject obj; static jmethodID mid; | |
}; | |
jmethodID JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port::mid = NULL; | |
struct JavaCPP_hidden JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port() : ptr(NULL), obj(NULL) { } | |
void operator()(void* arg0, const libremidi_midi_out_port* arg1); | |
void (*ptr)(void* arg0, const libremidi_midi_out_port* arg1); | |
jobject obj; static jmethodID mid; | |
}; | |
jmethodID JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port::mid = NULL; | |
struct JavaCPP_hidden JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long() : ptr(NULL), obj(NULL) { } | |
libremidi_timestamp operator()(void* arg0, libremidi_timestamp arg1); | |
libremidi_timestamp (*ptr)(void* arg0, libremidi_timestamp arg1); | |
jobject obj; static jmethodID mid; | |
}; | |
jmethodID JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long::mid = NULL; | |
struct JavaCPP_hidden JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long() : ptr(NULL), obj(NULL) { } | |
void operator()(void* arg0, const midi2_symbol* arg1, size_t arg2); | |
void (*ptr)(void* arg0, const midi2_symbol* arg1, size_t arg2); | |
jobject obj; static jmethodID mid; | |
}; | |
jmethodID JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long::mid = NULL; | |
struct JavaCPP_hidden JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long() : ptr(NULL), obj(NULL) { } | |
void operator()(void* arg0, const midi1_symbol* arg1, size_t arg2); | |
void (*ptr)(void* arg0, const midi1_symbol* arg1, size_t arg2); | |
jobject obj; static jmethodID mid; | |
}; | |
jmethodID JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long::mid = NULL; | |
static JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[10]; | |
static JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[10]; | |
static JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[10]; | |
static JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[10]; | |
static JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[10]; | |
static void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_deallocate(void *p) { | |
int n = sizeof(JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances) / sizeof(JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[0]); | |
for (int i = 0; i < n; i++) { if (JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[i].obj == ((JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port*)p)->obj) JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[i].obj = NULL; } | |
JNIEnv *e; bool a = JavaCPP_getEnv(&e); if (e != NULL) e->DeleteWeakGlobalRef((jweak)((JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port*)p)->obj); delete (JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port*)p; JavaCPP_detach(a); } | |
static void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_deallocate(void *p) { | |
int n = sizeof(JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances) / sizeof(JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[0]); | |
for (int i = 0; i < n; i++) { if (JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[i].obj == ((JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port*)p)->obj) JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[i].obj = NULL; } | |
JNIEnv *e; bool a = JavaCPP_getEnv(&e); if (e != NULL) e->DeleteWeakGlobalRef((jweak)((JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port*)p)->obj); delete (JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port*)p; JavaCPP_detach(a); } | |
static void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_deallocate(void *p) { delete (libremidi_api_configuration*)p; } | |
static void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_deallocate(void *p) { | |
int n = sizeof(JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances) / sizeof(JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[0]); | |
for (int i = 0; i < n; i++) { if (JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[i].obj == ((JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long*)p)->obj) JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[i].obj = NULL; } | |
JNIEnv *e; bool a = JavaCPP_getEnv(&e); if (e != NULL) e->DeleteWeakGlobalRef((jweak)((JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long*)p)->obj); delete (JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long*)p; JavaCPP_detach(a); } | |
static void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_deallocate(void *p) { | |
int n = sizeof(JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances) / sizeof(JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[0]); | |
for (int i = 0; i < n; i++) { if (JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[i].obj == ((JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long*)p)->obj) JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[i].obj = NULL; } | |
JNIEnv *e; bool a = JavaCPP_getEnv(&e); if (e != NULL) e->DeleteWeakGlobalRef((jweak)((JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long*)p)->obj); delete (JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long*)p; JavaCPP_detach(a); } | |
static void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_deallocate(void *p) { | |
int n = sizeof(JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances) / sizeof(JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[0]); | |
for (int i = 0; i < n; i++) { if (JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[i].obj == ((JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long*)p)->obj) JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[i].obj = NULL; } | |
JNIEnv *e; bool a = JavaCPP_getEnv(&e); if (e != NULL) e->DeleteWeakGlobalRef((jweak)((JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long*)p)->obj); delete (JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long*)p; JavaCPP_detach(a); } | |
static void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_deallocate(void *p) { delete (libremidi_midi_configuration*)p; } | |
static void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_deallocate(void *p) { delete (libremidi_observer_configuration*)p; } | |
static void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_deallocateArray(void* p) { delete[] (libremidi_api_configuration*)p; } | |
static void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_deallocateArray(void* p) { delete[] (libremidi_midi_configuration*)p; } | |
static void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_deallocateArray(void* p) { delete[] (libremidi_observer_configuration*)p; } | |
static const char* JavaCPP_members[21][16] = { | |
{ NULL }, | |
{ NULL }, | |
{ NULL }, | |
{ NULL }, | |
{ NULL }, | |
{ NULL }, | |
{ NULL }, | |
{ NULL }, | |
{ NULL }, | |
{ NULL }, | |
{ NULL }, | |
{ NULL }, | |
{ NULL }, | |
{ "sizeof", "data", "api" }, | |
{ NULL }, | |
{ NULL }, | |
{ NULL }, | |
{ NULL }, | |
{ NULL }, | |
{ "sizeof", "on_midi1_message.context", "on_midi1_message.callback", "on_midi2_message.context", "on_midi2_message.callback", "get_timestamp.context", "get_timestamp.callback", "virtual_port", "ignore_sysex", "ignore_timing", "ignore_sensing", "port_name", "timestamps", "out_port", "in_port" }, | |
{ "sizeof", "notify_in_constructor", "track_virtual", "track_hardware", "track_any" } }; | |
static int JavaCPP_offsets[21][16] = { | |
{ -1 }, | |
{ -1 }, | |
{ -1 }, | |
{ -1 }, | |
{ -1 }, | |
{ -1 }, | |
{ -1 }, | |
{ -1 }, | |
{ -1 }, | |
{ -1 }, | |
{ -1 }, | |
{ -1 }, | |
{ -1 }, | |
{ sizeof(libremidi_api_configuration), offsetof(libremidi_api_configuration, data), offsetof(libremidi_api_configuration, api) }, | |
{ -1 }, | |
{ -1 }, | |
{ -1 }, | |
{ -1 }, | |
{ -1 }, | |
{ sizeof(libremidi_midi_configuration), offsetof(libremidi_midi_configuration, on_midi1_message.context), offsetof(libremidi_midi_configuration, on_midi1_message.callback), offsetof(libremidi_midi_configuration, on_midi2_message.context), offsetof(libremidi_midi_configuration, on_midi2_message.callback), offsetof(libremidi_midi_configuration, get_timestamp.context), offsetof(libremidi_midi_configuration, get_timestamp.callback), offsetof(libremidi_midi_configuration, virtual_port), offsetof(libremidi_midi_configuration, ignore_sysex), offsetof(libremidi_midi_configuration, ignore_timing), offsetof(libremidi_midi_configuration, ignore_sensing), offsetof(libremidi_midi_configuration, port_name), offsetof(libremidi_midi_configuration, timestamps), offsetof(libremidi_midi_configuration, out_port), offsetof(libremidi_midi_configuration, in_port) }, | |
{ sizeof(libremidi_observer_configuration), offsetof(libremidi_observer_configuration, notify_in_constructor), offsetof(libremidi_observer_configuration, track_virtual), offsetof(libremidi_observer_configuration, track_hardware), offsetof(libremidi_observer_configuration, track_any) } }; | |
static int JavaCPP_memberOffsetSizes[21] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 15, 5 }; | |
extern "C" { | |
JNIEXPORT jint JNICALL JNI_OnLoad_jnijavacpp(JavaVM* vm, void* reserved); | |
JNIEXPORT void JNICALL JNI_OnUnload_jnijavacpp(JavaVM* vm, void* reserved); | |
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved) { | |
if (JNI_OnLoad_jnijavacpp(vm, reserved) == JNI_ERR) { | |
return JNI_ERR; | |
} | |
JNIEnv* env; | |
if (vm->GetEnv((void**)&env, JNI_VERSION_1_6) != JNI_OK) { | |
JavaCPP_log("Could not get JNIEnv for JNI_VERSION_1_6 inside JNI_OnLoad()."); | |
return JNI_ERR; | |
} | |
if (JavaCPP_vm == vm) { | |
return env->GetVersion(); | |
} | |
JavaCPP_vm = vm; | |
JavaCPP_haveAllocObject = env->functions->AllocObject != NULL; | |
JavaCPP_haveNonvirtual = env->functions->CallNonvirtualVoidMethodA != NULL; | |
jmethodID putMemberOffsetMID = JavaCPP_getStaticMethodID(env, 3, "putMemberOffset", "(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/Class;"); | |
if (putMemberOffsetMID == NULL) { | |
return JNI_ERR; | |
} | |
for (int i = 0; i < 21 && !env->ExceptionCheck(); i++) { | |
for (int j = 0; j < JavaCPP_memberOffsetSizes[i] && !env->ExceptionCheck(); j++) { | |
if (env->PushLocalFrame(3) == 0) { | |
jvalue args[3]; | |
args[0].l = env->NewStringUTF(JavaCPP_classNames[i]); | |
args[1].l = JavaCPP_members[i][j] == NULL ? NULL : env->NewStringUTF(JavaCPP_members[i][j]); | |
args[2].i = JavaCPP_offsets[i][j]; | |
jclass cls = (jclass)env->CallStaticObjectMethodA(JavaCPP_getClass(env, 3), putMemberOffsetMID, args); | |
if (env->ExceptionCheck()) { | |
JavaCPP_log("Error putting member offsets for class %s.", JavaCPP_classNames[i]); | |
return JNI_ERR; | |
} | |
JavaCPP_classes[i] = cls == NULL ? NULL : (jclass)env->NewWeakGlobalRef(cls); | |
if (env->ExceptionCheck()) { | |
JavaCPP_log("Error creating global reference of class %s.", JavaCPP_classNames[i]); | |
return JNI_ERR; | |
} | |
env->PopLocalFrame(NULL); | |
} | |
} | |
} | |
JavaCPP_addressFID = JavaCPP_getFieldID(env, 0, "address", "J"); | |
if (JavaCPP_addressFID == NULL) { | |
return JNI_ERR; | |
} | |
JavaCPP_positionFID = JavaCPP_getFieldID(env, 0, "position", "J"); | |
if (JavaCPP_positionFID == NULL) { | |
return JNI_ERR; | |
} | |
JavaCPP_limitFID = JavaCPP_getFieldID(env, 0, "limit", "J"); | |
if (JavaCPP_limitFID == NULL) { | |
return JNI_ERR; | |
} | |
JavaCPP_capacityFID = JavaCPP_getFieldID(env, 0, "capacity", "J"); | |
if (JavaCPP_capacityFID == NULL) { | |
return JNI_ERR; | |
} | |
JavaCPP_deallocatorFID = JavaCPP_getFieldID(env, 0, "deallocator", "Lorg/bytedeco/javacpp/Pointer$Deallocator;"); | |
if (JavaCPP_deallocatorFID == NULL) { | |
return JNI_ERR; | |
} | |
JavaCPP_ownerAddressFID = JavaCPP_getFieldID(env, 2, "ownerAddress", "J"); | |
if (JavaCPP_ownerAddressFID == NULL) { | |
return JNI_ERR; | |
} | |
JavaCPP_initMID = JavaCPP_getMethodID(env, 0, "init", "(JJJJ)V"); | |
if (JavaCPP_initMID == NULL) { | |
return JNI_ERR; | |
} | |
JavaCPP_arrayMID = JavaCPP_getMethodID(env, 4, "array", "()Ljava/lang/Object;"); | |
if (JavaCPP_arrayMID == NULL) { | |
return JNI_ERR; | |
} | |
JavaCPP_arrayOffsetMID = JavaCPP_getMethodID(env, 4, "arrayOffset", "()I"); | |
if (JavaCPP_arrayOffsetMID == NULL) { | |
return JNI_ERR; | |
} | |
JavaCPP_bufferPositionFID = JavaCPP_getFieldID(env, 4, "position", "I"); | |
if (JavaCPP_bufferPositionFID == NULL) { | |
return JNI_ERR; | |
} | |
JavaCPP_bufferLimitFID = JavaCPP_getFieldID(env, 4, "limit", "I"); | |
if (JavaCPP_bufferLimitFID == NULL) { | |
return JNI_ERR; | |
} | |
JavaCPP_bufferCapacityFID = JavaCPP_getFieldID(env, 4, "capacity", "I"); | |
if (JavaCPP_bufferCapacityFID == NULL) { | |
return JNI_ERR; | |
} | |
JavaCPP_stringMID = JavaCPP_getMethodID(env, 1, "<init>", "([B)V"); | |
if (JavaCPP_stringMID == NULL) { | |
return JNI_ERR; | |
} | |
JavaCPP_getBytesMID = JavaCPP_getMethodID(env, 1, "getBytes", "()[B"); | |
if (JavaCPP_getBytesMID == NULL) { | |
return JNI_ERR; | |
} | |
JavaCPP_toStringMID = JavaCPP_getMethodID(env, 5, "toString", "()Ljava/lang/String;"); | |
if (JavaCPP_toStringMID == NULL) { | |
return JNI_ERR; | |
} | |
#ifdef STRING_BYTES_CHARSET | |
jmethodID charsetForNameMID = JavaCPP_getStaticMethodID(env, 6, "forName", "(Ljava/lang/String;)Ljava/nio/charset/Charset;"); | |
if (charsetForNameMID == NULL) { | |
return JNI_ERR; | |
} | |
jstring charsetName = env->NewStringUTF(STRING_BYTES_CHARSET); | |
if (charsetName == NULL || env->ExceptionCheck()) { | |
JavaCPP_log("Error creating java.lang.String from '%s'", STRING_BYTES_CHARSET); | |
return JNI_ERR; | |
} | |
JavaCPP_stringBytesCharset = env->CallStaticObjectMethod(JavaCPP_getClass(env, 6), charsetForNameMID, charsetName); | |
if (JavaCPP_stringBytesCharset == NULL || env->ExceptionCheck()) { | |
JavaCPP_log("Error when calling Charset.forName() for '%s'", STRING_BYTES_CHARSET); | |
return JNI_ERR; | |
} | |
JavaCPP_stringBytesCharset = env->NewGlobalRef(JavaCPP_stringBytesCharset); | |
if (JavaCPP_stringBytesCharset == NULL) { | |
JavaCPP_log("Error creating global reference for java.nio.charset.Charset instance"); | |
return JNI_ERR; | |
} | |
JavaCPP_stringWithCharsetMID = JavaCPP_getMethodID(env, 1, "<init>", "([BLjava/nio/charset/Charset;)V"); | |
if (JavaCPP_stringWithCharsetMID == NULL) { | |
return JNI_ERR; | |
} | |
JavaCPP_getBytesWithCharsetMID = JavaCPP_getMethodID(env, 1, "getBytes", "(Ljava/nio/charset/Charset;)[B"); | |
if (JavaCPP_getBytesWithCharsetMID == NULL) { | |
return JNI_ERR; | |
} | |
#endif // STRING_BYTES_CHARSET | |
return env->GetVersion(); | |
} | |
JNIEXPORT void JNICALL JNI_OnUnload(JavaVM* vm, void* reserved) { | |
JNIEnv* env; | |
if (vm->GetEnv((void**)&env, JNI_VERSION_1_6) != JNI_OK) { | |
JavaCPP_log("Could not get JNIEnv for JNI_VERSION_1_6 inside JNI_OnUnLoad()."); | |
return; | |
} | |
for (int i = 0; i < 21; i++) { | |
env->DeleteWeakGlobalRef((jweak)JavaCPP_classes[i]); | |
JavaCPP_classes[i] = NULL; | |
} | |
#ifdef STRING_BYTES_CHARSET | |
env->DeleteGlobalRef(JavaCPP_stringBytesCharset); | |
JavaCPP_stringBytesCharset = NULL; | |
#endif | |
JNI_OnUnload_jnijavacpp(vm, reserved); | |
JavaCPP_vm = NULL; | |
} | |
JNIEXPORT void JNICALL Java_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_call(JNIEnv* env, jobject obj, jobject arg0, jobject arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port* ptr = (JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return; | |
} | |
if (ptr->ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This function pointer address is NULL."); | |
return; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
char* ptr0 = arg0 == NULL ? NULL : (char*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
libremidi_midi_in_port* ptr1 = arg1 == NULL ? NULL : (libremidi_midi_in_port*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jthrowable exc = NULL; | |
try { | |
(*ptr->ptr)(ptr0, (const libremidi_midi_in_port*)ptr1); | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback(void* arg0, const libremidi_midi_in_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[0](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback1(void* arg0, const libremidi_midi_in_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[1](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback2(void* arg0, const libremidi_midi_in_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[2](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback3(void* arg0, const libremidi_midi_in_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[3](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback4(void* arg0, const libremidi_midi_in_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[4](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback5(void* arg0, const libremidi_midi_in_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[5](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback6(void* arg0, const libremidi_midi_in_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[6](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback7(void* arg0, const libremidi_midi_in_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[7](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback8(void* arg0, const libremidi_midi_in_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[8](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback9(void* arg0, const libremidi_midi_in_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[9](arg0, arg1); | |
} | |
static void (*JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callbacks[10])(void* arg0, const libremidi_midi_in_port* arg1) = { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback1, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback2, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback3, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback4, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback5, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback6, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback7, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback8, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callback9 }; | |
void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port::operator()(void* arg0, const libremidi_midi_in_port* arg1) { | |
jthrowable exc = NULL; | |
JNIEnv* env; | |
bool attached = JavaCPP_getEnv(&env); | |
if (env == NULL) { | |
goto end; | |
} | |
{ | |
jvalue args[2]; | |
jobject obj0 = NULL; | |
void* ptr0 = NULL; | |
ptr0 = (void*)arg0; | |
if (ptr0 != NULL) { | |
obj0 = JavaCPP_createPointer(env, 0); | |
} | |
if (obj0 != NULL) { | |
env->SetLongField(obj0, JavaCPP_addressFID, ptr_to_jlong(ptr0)); | |
} | |
args[0].l = obj0; | |
jobject obj1 = NULL; | |
libremidi_midi_in_port* ptr1 = NULL; | |
ptr1 = (libremidi_midi_in_port*)arg1; | |
if (ptr1 != NULL) { | |
obj1 = JavaCPP_createPointer(env, 9); | |
} | |
if (obj1 != NULL) { | |
env->SetLongField(obj1, JavaCPP_addressFID, ptr_to_jlong(ptr1)); | |
} | |
args[1].l = obj1; | |
if (obj == NULL) { | |
obj = JavaCPP_createPointer(env, 10); | |
obj = obj == NULL ? NULL : env->NewGlobalRef(obj); | |
if (obj == NULL) { | |
JavaCPP_log("Error creating global reference of dev.atsushieno.libremidi_javacpp.Arg2_Pointer_libremidi_midi_in_port instance for callback."); | |
} else { | |
env->SetLongField(obj, JavaCPP_addressFID, ptr_to_jlong(this)); | |
} | |
for (int i = 0; i < 10; i++) { | |
if (this == &JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[i]) { | |
ptr = JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callbacks[i]; | |
break; | |
} | |
} | |
} | |
if (mid == NULL) { | |
mid = JavaCPP_getMethodID(env, 10, "call", "(Lorg/bytedeco/javacpp/Pointer;Ldev/atsushieno/libremidi_javacpp/libremidi_midi_in_port;)V"); | |
} | |
if (obj == NULL) { | |
JavaCPP_log("Function pointer object is NULL in callback for dev.atsushieno.libremidi_javacpp.Arg2_Pointer_libremidi_midi_in_port."); | |
} else if (mid == NULL) { | |
JavaCPP_log("Error getting method ID of function caller \"public native void dev.atsushieno.libremidi_javacpp.Arg2_Pointer_libremidi_midi_in_port.call(org.bytedeco.javacpp.Pointer,dev.atsushieno.libremidi_javacpp.libremidi_midi_in_port)\" for callback."); | |
} else { | |
env->CallVoidMethodA(obj, mid, args); | |
if ((exc = env->ExceptionOccurred()) != NULL) { | |
env->ExceptionClear(); | |
} | |
} | |
env->DeleteLocalRef(obj0); | |
env->DeleteLocalRef(obj1); | |
} | |
end: | |
if (exc != NULL) { | |
jstring str = (jstring)env->CallObjectMethod(exc, JavaCPP_toStringMID); | |
env->DeleteLocalRef(exc); | |
const char *msg = JavaCPP_getStringBytes(env, str); | |
JavaCPP_exception e(msg); | |
JavaCPP_releaseStringBytes(env, str, msg); | |
env->DeleteLocalRef(str); | |
JavaCPP_detach(attached); | |
throw e; | |
} else { | |
JavaCPP_detach(attached); | |
} | |
} | |
JNIEXPORT void JNICALL Java_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate(JNIEnv* env, jobject obj) { | |
obj = env->NewWeakGlobalRef(obj); | |
if (obj == NULL) { | |
JavaCPP_log("Error creating global reference of dev.atsushieno.libremidi_javacpp.Arg2_Pointer_libremidi_midi_in_port instance for callback."); | |
return; | |
} | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port* rptr = new (std::nothrow) JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port; | |
if (rptr != NULL) { | |
rptr->obj = obj; | |
JavaCPP_initPointer(env, obj, rptr, 1, rptr, &JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_deallocate); | |
for (int i = 0; i < 10; i++) { | |
if (JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[i].obj == NULL) { | |
rptr->ptr = JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_allocate_callbacks[i]; | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port_instances[i] = *rptr; | |
break; | |
} | |
} | |
} | |
} | |
JNIEXPORT void JNICALL Java_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_call(JNIEnv* env, jobject obj, jobject arg0, jobject arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port* ptr = (JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return; | |
} | |
if (ptr->ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This function pointer address is NULL."); | |
return; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
char* ptr0 = arg0 == NULL ? NULL : (char*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
libremidi_midi_out_port* ptr1 = arg1 == NULL ? NULL : (libremidi_midi_out_port*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jthrowable exc = NULL; | |
try { | |
(*ptr->ptr)(ptr0, (const libremidi_midi_out_port*)ptr1); | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback(void* arg0, const libremidi_midi_out_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[0](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback1(void* arg0, const libremidi_midi_out_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[1](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback2(void* arg0, const libremidi_midi_out_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[2](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback3(void* arg0, const libremidi_midi_out_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[3](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback4(void* arg0, const libremidi_midi_out_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[4](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback5(void* arg0, const libremidi_midi_out_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[5](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback6(void* arg0, const libremidi_midi_out_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[6](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback7(void* arg0, const libremidi_midi_out_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[7](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback8(void* arg0, const libremidi_midi_out_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[8](arg0, arg1); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback9(void* arg0, const libremidi_midi_out_port* arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[9](arg0, arg1); | |
} | |
static void (*JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callbacks[10])(void* arg0, const libremidi_midi_out_port* arg1) = { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback1, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback2, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback3, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback4, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback5, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback6, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback7, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback8, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callback9 }; | |
void JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port::operator()(void* arg0, const libremidi_midi_out_port* arg1) { | |
jthrowable exc = NULL; | |
JNIEnv* env; | |
bool attached = JavaCPP_getEnv(&env); | |
if (env == NULL) { | |
goto end; | |
} | |
{ | |
jvalue args[2]; | |
jobject obj0 = NULL; | |
void* ptr0 = NULL; | |
ptr0 = (void*)arg0; | |
if (ptr0 != NULL) { | |
obj0 = JavaCPP_createPointer(env, 0); | |
} | |
if (obj0 != NULL) { | |
env->SetLongField(obj0, JavaCPP_addressFID, ptr_to_jlong(ptr0)); | |
} | |
args[0].l = obj0; | |
jobject obj1 = NULL; | |
libremidi_midi_out_port* ptr1 = NULL; | |
ptr1 = (libremidi_midi_out_port*)arg1; | |
if (ptr1 != NULL) { | |
obj1 = JavaCPP_createPointer(env, 11); | |
} | |
if (obj1 != NULL) { | |
env->SetLongField(obj1, JavaCPP_addressFID, ptr_to_jlong(ptr1)); | |
} | |
args[1].l = obj1; | |
if (obj == NULL) { | |
obj = JavaCPP_createPointer(env, 12); | |
obj = obj == NULL ? NULL : env->NewGlobalRef(obj); | |
if (obj == NULL) { | |
JavaCPP_log("Error creating global reference of dev.atsushieno.libremidi_javacpp.Arg2_Pointer_libremidi_midi_out_port instance for callback."); | |
} else { | |
env->SetLongField(obj, JavaCPP_addressFID, ptr_to_jlong(this)); | |
} | |
for (int i = 0; i < 10; i++) { | |
if (this == &JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[i]) { | |
ptr = JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callbacks[i]; | |
break; | |
} | |
} | |
} | |
if (mid == NULL) { | |
mid = JavaCPP_getMethodID(env, 12, "call", "(Lorg/bytedeco/javacpp/Pointer;Ldev/atsushieno/libremidi_javacpp/libremidi_midi_out_port;)V"); | |
} | |
if (obj == NULL) { | |
JavaCPP_log("Function pointer object is NULL in callback for dev.atsushieno.libremidi_javacpp.Arg2_Pointer_libremidi_midi_out_port."); | |
} else if (mid == NULL) { | |
JavaCPP_log("Error getting method ID of function caller \"public native void dev.atsushieno.libremidi_javacpp.Arg2_Pointer_libremidi_midi_out_port.call(org.bytedeco.javacpp.Pointer,dev.atsushieno.libremidi_javacpp.libremidi_midi_out_port)\" for callback."); | |
} else { | |
env->CallVoidMethodA(obj, mid, args); | |
if ((exc = env->ExceptionOccurred()) != NULL) { | |
env->ExceptionClear(); | |
} | |
} | |
env->DeleteLocalRef(obj0); | |
env->DeleteLocalRef(obj1); | |
} | |
end: | |
if (exc != NULL) { | |
jstring str = (jstring)env->CallObjectMethod(exc, JavaCPP_toStringMID); | |
env->DeleteLocalRef(exc); | |
const char *msg = JavaCPP_getStringBytes(env, str); | |
JavaCPP_exception e(msg); | |
JavaCPP_releaseStringBytes(env, str, msg); | |
env->DeleteLocalRef(str); | |
JavaCPP_detach(attached); | |
throw e; | |
} else { | |
JavaCPP_detach(attached); | |
} | |
} | |
JNIEXPORT void JNICALL Java_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate(JNIEnv* env, jobject obj) { | |
obj = env->NewWeakGlobalRef(obj); | |
if (obj == NULL) { | |
JavaCPP_log("Error creating global reference of dev.atsushieno.libremidi_javacpp.Arg2_Pointer_libremidi_midi_out_port instance for callback."); | |
return; | |
} | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port* rptr = new (std::nothrow) JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port; | |
if (rptr != NULL) { | |
rptr->obj = obj; | |
JavaCPP_initPointer(env, obj, rptr, 1, rptr, &JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_deallocate); | |
for (int i = 0; i < 10; i++) { | |
if (JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[i].obj == NULL) { | |
rptr->ptr = JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_allocate_callbacks[i]; | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port_instances[i] = *rptr; | |
break; | |
} | |
} | |
} | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1new__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_2Ldev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_2Lorg_bytedeco_javacpp_PointerPointer_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) { | |
libremidi_midi_configuration* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
libremidi_api_configuration* ptr1 = arg1 == NULL ? NULL : (libremidi_api_configuration*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
void** ptr2 = arg2 == NULL ? NULL : (void**)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jlong position2 = arg2 == NULL ? 0 : env->GetLongField(arg2, JavaCPP_positionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_new((const libremidi_midi_configuration*)ptr0, (const libremidi_api_configuration*)ptr1, (libremidi_midi_out_handle**)ptr2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1new__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_2Ldev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_2Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1handle_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) { | |
libremidi_midi_configuration* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
libremidi_api_configuration* ptr1 = arg1 == NULL ? NULL : (libremidi_api_configuration*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
libremidi_midi_out_handle* ptr2 = arg2 == NULL ? NULL : (libremidi_midi_out_handle*)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_new((const libremidi_midi_configuration*)ptr0, (const libremidi_api_configuration*)ptr1, (arg2 == NULL ? NULL : &ptr2)); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arg2 != NULL) env->SetLongField(arg2, JavaCPP_addressFID, ptr_to_jlong(ptr2)); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1in_1free(JNIEnv* env, jclass cls, jobject arg0) { | |
libremidi_midi_in_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_in_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_in_free(ptr0); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1in_1new__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_2Ldev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_2Lorg_bytedeco_javacpp_PointerPointer_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) { | |
libremidi_midi_configuration* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
libremidi_api_configuration* ptr1 = arg1 == NULL ? NULL : (libremidi_api_configuration*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
void** ptr2 = arg2 == NULL ? NULL : (void**)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jlong position2 = arg2 == NULL ? 0 : env->GetLongField(arg2, JavaCPP_positionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_in_new((const libremidi_midi_configuration*)ptr0, (const libremidi_api_configuration*)ptr1, (libremidi_midi_in_handle**)ptr2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1in_1new__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_2Ldev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_2Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1in_1handle_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) { | |
libremidi_midi_configuration* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
libremidi_api_configuration* ptr1 = arg1 == NULL ? NULL : (libremidi_api_configuration*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
libremidi_midi_in_handle* ptr2 = arg2 == NULL ? NULL : (libremidi_midi_in_handle*)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_in_new((const libremidi_midi_configuration*)ptr0, (const libremidi_api_configuration*)ptr1, (arg2 == NULL ? NULL : &ptr2)); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arg2 != NULL) env->SetLongField(arg2, JavaCPP_addressFID, ptr_to_jlong(ptr2)); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1free(JNIEnv* env, jclass cls, jobject arg0) { | |
libremidi_midi_out_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_free(ptr0); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1configuration_1init(JNIEnv* env, jclass cls, jobject arg0) { | |
libremidi_midi_configuration* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_configuration_init(ptr0); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1send_1message__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1handle_2_3BJ(JNIEnv* env, jclass cls, jobject arg0, jbyteArray arg1, jlong arg2) { | |
libremidi_midi_out_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
signed char* ptr1 = arg1 == NULL ? NULL : env->GetByteArrayElements(arg1, NULL); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_send_message(ptr0, (const midi1_symbol*)ptr1, (size_t)arg2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arg1 != NULL) env->ReleaseByteArrayElements(arg1, (jbyte*)ptr1, JNI_ABORT); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1send_1message__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1handle_2Ljava_nio_ByteBuffer_2J(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jlong arg2) { | |
libremidi_midi_out_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
signed char* ptr1 = arg1 == NULL ? NULL : (signed char*)env->GetDirectBufferAddress(arg1); | |
jbyteArray arr1 = NULL; | |
jlong offset1 = 0; | |
if (arg1 != NULL && ptr1 == NULL) { | |
arr1 = (jbyteArray)env->CallObjectMethod(arg1, JavaCPP_arrayMID); | |
offset1 = env->CallIntMethod(arg1, JavaCPP_arrayOffsetMID); | |
if (env->ExceptionOccurred() != NULL) { | |
return 0; | |
} else { | |
ptr1 = arr1 == NULL ? NULL : env->GetByteArrayElements(arr1, NULL) + offset1; | |
} | |
} | |
jlong position1 = arg1 == NULL ? 0 : env->GetIntField(arg1, JavaCPP_bufferPositionFID); | |
ptr1 += position1; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_send_message(ptr0, (const midi1_symbol*)ptr1, (size_t)arg2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arr1 != NULL) env->ReleaseByteArrayElements(arr1, (jbyte*)(ptr1 - position1), JNI_ABORT); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1send_1message__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1handle_2Lorg_bytedeco_javacpp_BytePointer_2J(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jlong arg2) { | |
libremidi_midi_out_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
signed char* ptr1 = arg1 == NULL ? NULL : (signed char*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_send_message(ptr0, (const midi1_symbol*)ptr1, (size_t)arg2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1observer_1configuration_1init(JNIEnv* env, jclass cls, jobject arg0) { | |
libremidi_observer_configuration* ptr0 = arg0 == NULL ? NULL : (libremidi_observer_configuration*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_observer_configuration_init(ptr0); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1schedule_1message__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1handle_2JLjava_nio_ByteBuffer_2J(JNIEnv* env, jclass cls, jobject arg0, jlong arg1, jobject arg2, jlong arg3) { | |
libremidi_midi_out_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
signed char* ptr2 = arg2 == NULL ? NULL : (signed char*)env->GetDirectBufferAddress(arg2); | |
jbyteArray arr2 = NULL; | |
jlong offset2 = 0; | |
if (arg2 != NULL && ptr2 == NULL) { | |
arr2 = (jbyteArray)env->CallObjectMethod(arg2, JavaCPP_arrayMID); | |
offset2 = env->CallIntMethod(arg2, JavaCPP_arrayOffsetMID); | |
if (env->ExceptionOccurred() != NULL) { | |
return 0; | |
} else { | |
ptr2 = arr2 == NULL ? NULL : env->GetByteArrayElements(arr2, NULL) + offset2; | |
} | |
} | |
jlong position2 = arg2 == NULL ? 0 : env->GetIntField(arg2, JavaCPP_bufferPositionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_schedule_message(ptr0, (int64_t)arg1, (const midi1_symbol*)ptr2, (size_t)arg3); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arr2 != NULL) env->ReleaseByteArrayElements(arr2, (jbyte*)(ptr2 - position2), JNI_ABORT); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1schedule_1message__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1handle_2J_3BJ(JNIEnv* env, jclass cls, jobject arg0, jlong arg1, jbyteArray arg2, jlong arg3) { | |
libremidi_midi_out_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
signed char* ptr2 = arg2 == NULL ? NULL : env->GetByteArrayElements(arg2, NULL); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_schedule_message(ptr0, (int64_t)arg1, (const midi1_symbol*)ptr2, (size_t)arg3); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arg2 != NULL) env->ReleaseByteArrayElements(arg2, (jbyte*)ptr2, JNI_ABORT); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1schedule_1message__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1handle_2JLorg_bytedeco_javacpp_BytePointer_2J(JNIEnv* env, jclass cls, jobject arg0, jlong arg1, jobject arg2, jlong arg3) { | |
libremidi_midi_out_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
signed char* ptr2 = arg2 == NULL ? NULL : (signed char*)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jlong position2 = arg2 == NULL ? 0 : env->GetLongField(arg2, JavaCPP_positionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_schedule_message(ptr0, (int64_t)arg1, (const midi1_symbol*)ptr2, (size_t)arg3); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1send_1ump__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1handle_2_3IJ(JNIEnv* env, jclass cls, jobject arg0, jintArray arg1, jlong arg2) { | |
libremidi_midi_out_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
int* ptr1 = arg1 == NULL ? NULL : env->GetIntArrayElements(arg1, NULL); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_send_ump(ptr0, (const midi2_symbol*)ptr1, (size_t)arg2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arg1 != NULL) env->ReleaseIntArrayElements(arg1, (jint*)ptr1, JNI_ABORT); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1send_1ump__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1handle_2Ljava_nio_IntBuffer_2J(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jlong arg2) { | |
libremidi_midi_out_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
int* ptr1 = arg1 == NULL ? NULL : (int*)env->GetDirectBufferAddress(arg1); | |
jintArray arr1 = NULL; | |
jlong offset1 = 0; | |
if (arg1 != NULL && ptr1 == NULL) { | |
arr1 = (jintArray)env->CallObjectMethod(arg1, JavaCPP_arrayMID); | |
offset1 = env->CallIntMethod(arg1, JavaCPP_arrayOffsetMID); | |
if (env->ExceptionOccurred() != NULL) { | |
return 0; | |
} else { | |
ptr1 = arr1 == NULL ? NULL : env->GetIntArrayElements(arr1, NULL) + offset1; | |
} | |
} | |
jlong position1 = arg1 == NULL ? 0 : env->GetIntField(arg1, JavaCPP_bufferPositionFID); | |
ptr1 += position1; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_send_ump(ptr0, (const midi2_symbol*)ptr1, (size_t)arg2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arr1 != NULL) env->ReleaseIntArrayElements(arr1, (jint*)(ptr1 - position1), JNI_ABORT); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1send_1ump__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1handle_2Lorg_bytedeco_javacpp_IntPointer_2J(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jlong arg2) { | |
libremidi_midi_out_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
int* ptr1 = arg1 == NULL ? NULL : (int*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_send_ump(ptr0, (const midi2_symbol*)ptr1, (size_t)arg2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1observer_1new__Ldev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_2Ldev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_2Lorg_bytedeco_javacpp_PointerPointer_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) { | |
libremidi_observer_configuration* ptr0 = arg0 == NULL ? NULL : (libremidi_observer_configuration*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
libremidi_api_configuration* ptr1 = arg1 == NULL ? NULL : (libremidi_api_configuration*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
void** ptr2 = arg2 == NULL ? NULL : (void**)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jlong position2 = arg2 == NULL ? 0 : env->GetLongField(arg2, JavaCPP_positionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_observer_new((const libremidi_observer_configuration*)ptr0, ptr1, (libremidi_midi_observer_handle**)ptr2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1observer_1new__Ldev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_2Ldev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_2Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1observer_1handle_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) { | |
libremidi_observer_configuration* ptr0 = arg0 == NULL ? NULL : (libremidi_observer_configuration*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
libremidi_api_configuration* ptr1 = arg1 == NULL ? NULL : (libremidi_api_configuration*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
libremidi_midi_observer_handle* ptr2 = arg2 == NULL ? NULL : (libremidi_midi_observer_handle*)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_observer_new((const libremidi_observer_configuration*)ptr0, ptr1, (arg2 == NULL ? NULL : &ptr2)); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arg2 != NULL) env->SetLongField(arg2, JavaCPP_addressFID, ptr_to_jlong(ptr2)); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1api_1configuration_1init(JNIEnv* env, jclass cls, jobject arg0) { | |
libremidi_api_configuration* ptr0 = arg0 == NULL ? NULL : (libremidi_api_configuration*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_api_configuration_init(ptr0); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1port_1free(JNIEnv* env, jclass cls, jobject arg0) { | |
libremidi_midi_out_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_port_free(ptr0); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1is_1connected(JNIEnv* env, jclass cls, jobject arg0) { | |
libremidi_midi_out_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_is_connected((const libremidi_midi_out_handle*)ptr0); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jlong JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1in_1absolute_1timestamp(JNIEnv* env, jclass cls, jobject arg0) { | |
libremidi_midi_in_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_in_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
libremidi_timestamp rval = (libremidi_timestamp)libremidi_midi_in_absolute_timestamp(ptr0); | |
rarg = (jlong)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1in_1port_1clone__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1in_1port_2Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1in_1port_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1) { | |
libremidi_midi_in_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_in_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
libremidi_midi_in_port* ptr1 = arg1 == NULL ? NULL : (libremidi_midi_in_port*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_in_port_clone((const libremidi_midi_in_port*)ptr0, (arg1 == NULL ? NULL : &ptr1)); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arg1 != NULL) env->SetLongField(arg1, JavaCPP_addressFID, ptr_to_jlong(ptr1)); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1in_1port_1clone__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1in_1port_2Lorg_bytedeco_javacpp_PointerPointer_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1) { | |
libremidi_midi_in_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_in_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
void** ptr1 = arg1 == NULL ? NULL : (void**)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_in_port_clone((const libremidi_midi_in_port*)ptr0, (libremidi_midi_in_port**)ptr1); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1in_1port_1name__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1in_1port_2Lorg_bytedeco_javacpp_BytePointer_2Lorg_bytedeco_javacpp_SizeTPointer_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) { | |
libremidi_midi_in_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_in_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
signed char* ptr1 = arg1 == NULL ? NULL : (signed char*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
size_t* ptr2 = arg2 == NULL ? NULL : (size_t*)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jlong position2 = arg2 == NULL ? 0 : env->GetLongField(arg2, JavaCPP_positionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_in_port_name((const libremidi_midi_in_port*)ptr0, (const char**)(arg1 == NULL ? NULL : &ptr1), (size_t*)ptr2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
ptr1 -= position1; | |
if (arg1 != NULL) env->SetLongField(arg1, JavaCPP_addressFID, ptr_to_jlong(ptr1)); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1in_1port_1name__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1in_1port_2Lorg_bytedeco_javacpp_PointerPointer_2Lorg_bytedeco_javacpp_SizeTPointer_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) { | |
libremidi_midi_in_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_in_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
void** ptr1 = arg1 == NULL ? NULL : (void**)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
size_t* ptr2 = arg2 == NULL ? NULL : (size_t*)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jlong position2 = arg2 == NULL ? 0 : env->GetLongField(arg2, JavaCPP_positionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_in_port_name((const libremidi_midi_in_port*)ptr0, (const char**)ptr1, (size_t*)ptr2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1in_1port_1name__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1in_1port_2Ljava_nio_ByteBuffer_2Lorg_bytedeco_javacpp_SizeTPointer_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) { | |
libremidi_midi_in_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_in_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
signed char* ptr1 = arg1 == NULL ? NULL : (signed char*)env->GetDirectBufferAddress(arg1); | |
jbyteArray arr1 = NULL; | |
jlong offset1 = 0; | |
if (arg1 != NULL && ptr1 == NULL) { | |
arr1 = (jbyteArray)env->CallObjectMethod(arg1, JavaCPP_arrayMID); | |
offset1 = env->CallIntMethod(arg1, JavaCPP_arrayOffsetMID); | |
if (env->ExceptionOccurred() != NULL) { | |
return 0; | |
} else { | |
ptr1 = arr1 == NULL ? NULL : env->GetByteArrayElements(arr1, NULL) + offset1; | |
} | |
} | |
jlong position1 = arg1 == NULL ? 0 : env->GetIntField(arg1, JavaCPP_bufferPositionFID); | |
ptr1 += position1; | |
size_t* ptr2 = arg2 == NULL ? NULL : (size_t*)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jlong position2 = arg2 == NULL ? 0 : env->GetLongField(arg2, JavaCPP_positionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_in_port_name((const libremidi_midi_in_port*)ptr0, (const char**)(arg1 == NULL ? NULL : &ptr1), (size_t*)ptr2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arr1 != NULL) env->ReleaseByteArrayElements(arr1, (jbyte*)(ptr1 - position1), JNI_ABORT); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1in_1port_1name__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1in_1port_2_3BLorg_bytedeco_javacpp_SizeTPointer_2(JNIEnv* env, jclass cls, jobject arg0, jbyteArray arg1, jobject arg2) { | |
libremidi_midi_in_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_in_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
signed char* ptr1 = arg1 == NULL ? NULL : env->GetByteArrayElements(arg1, NULL); | |
size_t* ptr2 = arg2 == NULL ? NULL : (size_t*)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jlong position2 = arg2 == NULL ? 0 : env->GetLongField(arg2, JavaCPP_positionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_in_port_name((const libremidi_midi_in_port*)ptr0, (const char**)(arg1 == NULL ? NULL : &ptr1), (size_t*)ptr2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arg1 != NULL) env->ReleaseByteArrayElements(arg1, (jbyte*)ptr1, JNI_ABORT); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1observer_1free(JNIEnv* env, jclass cls, jobject arg0) { | |
libremidi_midi_observer_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_observer_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_observer_free(ptr0); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1port_1name__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1port_2Lorg_bytedeco_javacpp_PointerPointer_2Lorg_bytedeco_javacpp_SizeTPointer_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) { | |
libremidi_midi_out_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
void** ptr1 = arg1 == NULL ? NULL : (void**)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
size_t* ptr2 = arg2 == NULL ? NULL : (size_t*)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jlong position2 = arg2 == NULL ? 0 : env->GetLongField(arg2, JavaCPP_positionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_port_name((const libremidi_midi_out_port*)ptr0, (const char**)ptr1, (size_t*)ptr2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1port_1name__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1port_2Lorg_bytedeco_javacpp_BytePointer_2Lorg_bytedeco_javacpp_SizeTPointer_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) { | |
libremidi_midi_out_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
signed char* ptr1 = arg1 == NULL ? NULL : (signed char*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
size_t* ptr2 = arg2 == NULL ? NULL : (size_t*)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jlong position2 = arg2 == NULL ? 0 : env->GetLongField(arg2, JavaCPP_positionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_port_name((const libremidi_midi_out_port*)ptr0, (const char**)(arg1 == NULL ? NULL : &ptr1), (size_t*)ptr2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
ptr1 -= position1; | |
if (arg1 != NULL) env->SetLongField(arg1, JavaCPP_addressFID, ptr_to_jlong(ptr1)); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1port_1name__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1port_2_3BLorg_bytedeco_javacpp_SizeTPointer_2(JNIEnv* env, jclass cls, jobject arg0, jbyteArray arg1, jobject arg2) { | |
libremidi_midi_out_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
signed char* ptr1 = arg1 == NULL ? NULL : env->GetByteArrayElements(arg1, NULL); | |
size_t* ptr2 = arg2 == NULL ? NULL : (size_t*)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jlong position2 = arg2 == NULL ? 0 : env->GetLongField(arg2, JavaCPP_positionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_port_name((const libremidi_midi_out_port*)ptr0, (const char**)(arg1 == NULL ? NULL : &ptr1), (size_t*)ptr2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arg1 != NULL) env->ReleaseByteArrayElements(arg1, (jbyte*)ptr1, JNI_ABORT); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1port_1name__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1port_2Ljava_nio_ByteBuffer_2Lorg_bytedeco_javacpp_SizeTPointer_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) { | |
libremidi_midi_out_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
signed char* ptr1 = arg1 == NULL ? NULL : (signed char*)env->GetDirectBufferAddress(arg1); | |
jbyteArray arr1 = NULL; | |
jlong offset1 = 0; | |
if (arg1 != NULL && ptr1 == NULL) { | |
arr1 = (jbyteArray)env->CallObjectMethod(arg1, JavaCPP_arrayMID); | |
offset1 = env->CallIntMethod(arg1, JavaCPP_arrayOffsetMID); | |
if (env->ExceptionOccurred() != NULL) { | |
return 0; | |
} else { | |
ptr1 = arr1 == NULL ? NULL : env->GetByteArrayElements(arr1, NULL) + offset1; | |
} | |
} | |
jlong position1 = arg1 == NULL ? 0 : env->GetIntField(arg1, JavaCPP_bufferPositionFID); | |
ptr1 += position1; | |
size_t* ptr2 = arg2 == NULL ? NULL : (size_t*)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jlong position2 = arg2 == NULL ? 0 : env->GetLongField(arg2, JavaCPP_positionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_port_name((const libremidi_midi_out_port*)ptr0, (const char**)(arg1 == NULL ? NULL : &ptr1), (size_t*)ptr2); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arr1 != NULL) env->ReleaseByteArrayElements(arr1, (jbyte*)(ptr1 - position1), JNI_ABORT); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1schedule_1ump__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1handle_2JLjava_nio_IntBuffer_2J(JNIEnv* env, jclass cls, jobject arg0, jlong arg1, jobject arg2, jlong arg3) { | |
libremidi_midi_out_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
int* ptr2 = arg2 == NULL ? NULL : (int*)env->GetDirectBufferAddress(arg2); | |
jintArray arr2 = NULL; | |
jlong offset2 = 0; | |
if (arg2 != NULL && ptr2 == NULL) { | |
arr2 = (jintArray)env->CallObjectMethod(arg2, JavaCPP_arrayMID); | |
offset2 = env->CallIntMethod(arg2, JavaCPP_arrayOffsetMID); | |
if (env->ExceptionOccurred() != NULL) { | |
return 0; | |
} else { | |
ptr2 = arr2 == NULL ? NULL : env->GetIntArrayElements(arr2, NULL) + offset2; | |
} | |
} | |
jlong position2 = arg2 == NULL ? 0 : env->GetIntField(arg2, JavaCPP_bufferPositionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_schedule_ump(ptr0, (int64_t)arg1, (const midi2_symbol*)ptr2, (size_t)arg3); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arr2 != NULL) env->ReleaseIntArrayElements(arr2, (jint*)(ptr2 - position2), JNI_ABORT); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1schedule_1ump__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1handle_2J_3IJ(JNIEnv* env, jclass cls, jobject arg0, jlong arg1, jintArray arg2, jlong arg3) { | |
libremidi_midi_out_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
int* ptr2 = arg2 == NULL ? NULL : env->GetIntArrayElements(arg2, NULL); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_schedule_ump(ptr0, (int64_t)arg1, (const midi2_symbol*)ptr2, (size_t)arg3); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arg2 != NULL) env->ReleaseIntArrayElements(arg2, (jint*)ptr2, JNI_ABORT); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1schedule_1ump__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1handle_2JLorg_bytedeco_javacpp_IntPointer_2J(JNIEnv* env, jclass cls, jobject arg0, jlong arg1, jobject arg2, jlong arg3) { | |
libremidi_midi_out_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
int* ptr2 = arg2 == NULL ? NULL : (int*)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jlong position2 = arg2 == NULL ? 0 : env->GetLongField(arg2, JavaCPP_positionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_schedule_ump(ptr0, (int64_t)arg1, (const midi2_symbol*)ptr2, (size_t)arg3); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1port_1clone__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1port_2Lorg_bytedeco_javacpp_PointerPointer_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1) { | |
libremidi_midi_out_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
void** ptr1 = arg1 == NULL ? NULL : (void**)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_port_clone((const libremidi_midi_out_port*)ptr0, (libremidi_midi_out_port**)ptr1); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1out_1port_1clone__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1port_2Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1port_2(JNIEnv* env, jclass cls, jobject arg0, jobject arg1) { | |
libremidi_midi_out_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
libremidi_midi_out_port* ptr1 = arg1 == NULL ? NULL : (libremidi_midi_out_port*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_out_port_clone((const libremidi_midi_out_port*)ptr0, (arg1 == NULL ? NULL : &ptr1)); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (arg1 != NULL) env->SetLongField(arg1, JavaCPP_addressFID, ptr_to_jlong(ptr1)); | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1in_1port_1free(JNIEnv* env, jclass cls, jobject arg0) { | |
libremidi_midi_in_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_in_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_in_port_free(ptr0); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1in_1is_1connected(JNIEnv* env, jclass cls, jobject arg0) { | |
libremidi_midi_in_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_in_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_in_is_connected((const libremidi_midi_in_handle*)ptr0); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1observer_1enumerate_1input_1ports(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) { | |
libremidi_midi_observer_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_observer_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
char* ptr1 = arg1 == NULL ? NULL : (char*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port* ptr2 = arg2 == NULL ? NULL : (JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1in_1port*)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jlong position2 = arg2 == NULL ? 0 : env->GetLongField(arg2, JavaCPP_positionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_observer_enumerate_input_ports(ptr0, ptr1, (ptr2 == NULL ? NULL : ptr2->ptr)); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_global_libremidi_libremidi_1midi_1observer_1enumerate_1output_1ports(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) { | |
libremidi_midi_observer_handle* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_observer_handle*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
char* ptr1 = arg1 == NULL ? NULL : (char*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port* ptr2 = arg2 == NULL ? NULL : (JavaCPP_dev_atsushieno_libremidi_1javacpp_Arg2_1Pointer_1libremidi_1midi_1out_1port*)jlong_to_ptr(env->GetLongField(arg2, JavaCPP_addressFID)); | |
jlong position2 = arg2 == NULL ? 0 : env->GetLongField(arg2, JavaCPP_positionFID); | |
ptr2 += position2; | |
jint rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
int rval = libremidi_midi_observer_enumerate_output_ports(ptr0, ptr1, (ptr2 == NULL ? NULL : ptr2->ptr)); | |
rarg = (jint)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT void JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_allocateArray(JNIEnv* env, jobject obj, jlong arg0) { | |
jthrowable exc = NULL; | |
try { | |
libremidi_api_configuration* rptr = new libremidi_api_configuration[arg0]; | |
jlong rcapacity = arg0; | |
JavaCPP_initPointer(env, obj, rptr, rcapacity, rptr, &JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_deallocateArray); | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_data__(JNIEnv* env, jobject obj) { | |
libremidi_api_configuration* ptr = (libremidi_api_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = NULL; | |
void* rptr; | |
rptr = ptr->data; | |
if (rptr != NULL) { | |
rarg = JavaCPP_createPointer(env, 0); | |
if (rarg != NULL) { | |
env->SetLongField(rarg, JavaCPP_addressFID, ptr_to_jlong(rptr)); | |
} | |
} | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_data__Lorg_bytedeco_javacpp_Pointer_2(JNIEnv* env, jobject obj, jobject arg0) { | |
libremidi_api_configuration* ptr = (libremidi_api_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
char* ptr0 = arg0 == NULL ? NULL : (char*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
jobject rarg = obj; | |
ptr->data = ptr0; | |
return rarg; | |
} | |
JNIEXPORT void JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_allocate(JNIEnv* env, jobject obj) { | |
jthrowable exc = NULL; | |
try { | |
libremidi_api_configuration* rptr = new libremidi_api_configuration(); | |
jlong rcapacity = 1; | |
JavaCPP_initPointer(env, obj, rptr, rcapacity, rptr, &JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_deallocate); | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_api__(JNIEnv* env, jobject obj) { | |
libremidi_api_configuration* ptr = (libremidi_api_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jint rarg = 0; | |
libremidi_api rval = (libremidi_api)ptr->api; | |
rarg = (jint)rval; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1api_1configuration_api__I(JNIEnv* env, jobject obj, jint arg0) { | |
libremidi_api_configuration* ptr = (libremidi_api_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = obj; | |
ptr->api = (libremidi_api)arg0; | |
return rarg; | |
} | |
JNIEXPORT jlong JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_call(JNIEnv* env, jobject obj, jobject arg0, jlong arg1) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long* ptr = (JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
if (ptr->ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This function pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
char* ptr0 = arg0 == NULL ? NULL : (char*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
jlong rarg = 0; | |
jthrowable exc = NULL; | |
try { | |
libremidi_timestamp rval = (libremidi_timestamp)(*ptr->ptr)(ptr0, (libremidi_timestamp)arg1); | |
rarg = (jlong)rval; | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
return rarg; | |
} | |
JNIEXPORT libremidi_timestamp JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback(void* arg0, libremidi_timestamp arg1) { | |
return JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[0](arg0, arg1); | |
} | |
JNIEXPORT libremidi_timestamp JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback1(void* arg0, libremidi_timestamp arg1) { | |
return JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[1](arg0, arg1); | |
} | |
JNIEXPORT libremidi_timestamp JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback2(void* arg0, libremidi_timestamp arg1) { | |
return JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[2](arg0, arg1); | |
} | |
JNIEXPORT libremidi_timestamp JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback3(void* arg0, libremidi_timestamp arg1) { | |
return JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[3](arg0, arg1); | |
} | |
JNIEXPORT libremidi_timestamp JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback4(void* arg0, libremidi_timestamp arg1) { | |
return JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[4](arg0, arg1); | |
} | |
JNIEXPORT libremidi_timestamp JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback5(void* arg0, libremidi_timestamp arg1) { | |
return JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[5](arg0, arg1); | |
} | |
JNIEXPORT libremidi_timestamp JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback6(void* arg0, libremidi_timestamp arg1) { | |
return JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[6](arg0, arg1); | |
} | |
JNIEXPORT libremidi_timestamp JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback7(void* arg0, libremidi_timestamp arg1) { | |
return JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[7](arg0, arg1); | |
} | |
JNIEXPORT libremidi_timestamp JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback8(void* arg0, libremidi_timestamp arg1) { | |
return JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[8](arg0, arg1); | |
} | |
JNIEXPORT libremidi_timestamp JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback9(void* arg0, libremidi_timestamp arg1) { | |
return JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[9](arg0, arg1); | |
} | |
static libremidi_timestamp (*JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callbacks[10])(void* arg0, libremidi_timestamp arg1) = { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback1, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback2, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback3, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback4, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback5, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback6, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback7, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback8, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callback9 }; | |
libremidi_timestamp JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long::operator()(void* arg0, libremidi_timestamp arg1) { | |
jlong rarg = 0; | |
jthrowable exc = NULL; | |
JNIEnv* env; | |
bool attached = JavaCPP_getEnv(&env); | |
if (env == NULL) { | |
goto end; | |
} | |
{ | |
jvalue args[2]; | |
jobject obj0 = NULL; | |
void* ptr0 = NULL; | |
ptr0 = (void*)arg0; | |
if (ptr0 != NULL) { | |
obj0 = JavaCPP_createPointer(env, 0); | |
} | |
if (obj0 != NULL) { | |
env->SetLongField(obj0, JavaCPP_addressFID, ptr_to_jlong(ptr0)); | |
} | |
args[0].l = obj0; | |
args[1].j = (jlong)arg1; | |
if (obj == NULL) { | |
obj = JavaCPP_createPointer(env, 14); | |
obj = obj == NULL ? NULL : env->NewGlobalRef(obj); | |
if (obj == NULL) { | |
JavaCPP_log("Error creating global reference of dev.atsushieno.libremidi_javacpp.libremidi_midi_configuration.Callback_Pointer_long instance for callback."); | |
} else { | |
env->SetLongField(obj, JavaCPP_addressFID, ptr_to_jlong(this)); | |
} | |
for (int i = 0; i < 10; i++) { | |
if (this == &JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[i]) { | |
ptr = JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callbacks[i]; | |
break; | |
} | |
} | |
} | |
if (mid == NULL) { | |
mid = JavaCPP_getMethodID(env, 14, "call", "(Lorg/bytedeco/javacpp/Pointer;J)J"); | |
} | |
if (obj == NULL) { | |
JavaCPP_log("Function pointer object is NULL in callback for dev.atsushieno.libremidi_javacpp.libremidi_midi_configuration.Callback_Pointer_long."); | |
} else if (mid == NULL) { | |
JavaCPP_log("Error getting method ID of function caller \"public native long dev.atsushieno.libremidi_javacpp.libremidi_midi_configuration$Callback_Pointer_long.call(org.bytedeco.javacpp.Pointer,long)\" for callback."); | |
} else { | |
rarg = env->CallLongMethodA(obj, mid, args); | |
if ((exc = env->ExceptionOccurred()) != NULL) { | |
env->ExceptionClear(); | |
} | |
} | |
env->DeleteLocalRef(obj0); | |
} | |
end: | |
if (exc != NULL) { | |
jstring str = (jstring)env->CallObjectMethod(exc, JavaCPP_toStringMID); | |
env->DeleteLocalRef(exc); | |
const char *msg = JavaCPP_getStringBytes(env, str); | |
JavaCPP_exception e(msg); | |
JavaCPP_releaseStringBytes(env, str, msg); | |
env->DeleteLocalRef(str); | |
JavaCPP_detach(attached); | |
throw e; | |
} else { | |
JavaCPP_detach(attached); | |
} | |
return (libremidi_timestamp)rarg; | |
} | |
JNIEXPORT void JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate(JNIEnv* env, jobject obj) { | |
obj = env->NewWeakGlobalRef(obj); | |
if (obj == NULL) { | |
JavaCPP_log("Error creating global reference of dev.atsushieno.libremidi_javacpp.libremidi_midi_configuration.Callback_Pointer_long instance for callback."); | |
return; | |
} | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long* rptr = new (std::nothrow) JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long; | |
if (rptr != NULL) { | |
rptr->obj = obj; | |
JavaCPP_initPointer(env, obj, rptr, 1, rptr, &JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_deallocate); | |
for (int i = 0; i < 10; i++) { | |
if (JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[i].obj == NULL) { | |
rptr->ptr = JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_allocate_callbacks[i]; | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_instances[i] = *rptr; | |
break; | |
} | |
} | |
} | |
} | |
JNIEXPORT void JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_call(JNIEnv* env, jobject obj, jobject arg0, jobject arg1, jlong arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long* ptr = (JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return; | |
} | |
if (ptr->ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This function pointer address is NULL."); | |
return; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
char* ptr0 = arg0 == NULL ? NULL : (char*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
int* ptr1 = arg1 == NULL ? NULL : (int*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
jthrowable exc = NULL; | |
try { | |
(*ptr->ptr)(ptr0, (const midi2_symbol*)ptr1, (size_t)arg2); | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback(void* arg0, const midi2_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[0](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback1(void* arg0, const midi2_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[1](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback2(void* arg0, const midi2_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[2](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback3(void* arg0, const midi2_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[3](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback4(void* arg0, const midi2_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[4](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback5(void* arg0, const midi2_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[5](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback6(void* arg0, const midi2_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[6](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback7(void* arg0, const midi2_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[7](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback8(void* arg0, const midi2_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[8](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback9(void* arg0, const midi2_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[9](arg0, arg1, arg2); | |
} | |
static void (*JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callbacks[10])(void* arg0, const midi2_symbol* arg1, size_t arg2) = { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback1, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback2, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback3, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback4, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback5, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback6, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback7, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback8, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callback9 }; | |
void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long::operator()(void* arg0, const midi2_symbol* arg1, size_t arg2) { | |
jthrowable exc = NULL; | |
JNIEnv* env; | |
bool attached = JavaCPP_getEnv(&env); | |
if (env == NULL) { | |
goto end; | |
} | |
{ | |
jvalue args[3]; | |
jobject obj0 = NULL; | |
void* ptr0 = NULL; | |
ptr0 = (void*)arg0; | |
if (ptr0 != NULL) { | |
obj0 = JavaCPP_createPointer(env, 0); | |
} | |
if (obj0 != NULL) { | |
env->SetLongField(obj0, JavaCPP_addressFID, ptr_to_jlong(ptr0)); | |
} | |
args[0].l = obj0; | |
jobject obj1 = NULL; | |
int* ptr1 = NULL; | |
ptr1 = (int*)arg1; | |
if (ptr1 != NULL) { | |
obj1 = JavaCPP_createPointer(env, 15); | |
} | |
if (obj1 != NULL) { | |
env->SetLongField(obj1, JavaCPP_addressFID, ptr_to_jlong(ptr1)); | |
} | |
args[1].l = obj1; | |
args[2].j = (jlong)arg2; | |
if (obj == NULL) { | |
obj = JavaCPP_createPointer(env, 16); | |
obj = obj == NULL ? NULL : env->NewGlobalRef(obj); | |
if (obj == NULL) { | |
JavaCPP_log("Error creating global reference of dev.atsushieno.libremidi_javacpp.libremidi_midi_configuration.Callback_Pointer_IntPointer_long instance for callback."); | |
} else { | |
env->SetLongField(obj, JavaCPP_addressFID, ptr_to_jlong(this)); | |
} | |
for (int i = 0; i < 10; i++) { | |
if (this == &JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[i]) { | |
ptr = JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callbacks[i]; | |
break; | |
} | |
} | |
} | |
if (mid == NULL) { | |
mid = JavaCPP_getMethodID(env, 16, "call", "(Lorg/bytedeco/javacpp/Pointer;Lorg/bytedeco/javacpp/IntPointer;J)V"); | |
} | |
if (obj == NULL) { | |
JavaCPP_log("Function pointer object is NULL in callback for dev.atsushieno.libremidi_javacpp.libremidi_midi_configuration.Callback_Pointer_IntPointer_long."); | |
} else if (mid == NULL) { | |
JavaCPP_log("Error getting method ID of function caller \"public native void dev.atsushieno.libremidi_javacpp.libremidi_midi_configuration$Callback_Pointer_IntPointer_long.call(org.bytedeco.javacpp.Pointer,org.bytedeco.javacpp.IntPointer,long)\" for callback."); | |
} else { | |
env->CallVoidMethodA(obj, mid, args); | |
if ((exc = env->ExceptionOccurred()) != NULL) { | |
env->ExceptionClear(); | |
} | |
} | |
env->DeleteLocalRef(obj0); | |
env->DeleteLocalRef(obj1); | |
} | |
end: | |
if (exc != NULL) { | |
jstring str = (jstring)env->CallObjectMethod(exc, JavaCPP_toStringMID); | |
env->DeleteLocalRef(exc); | |
const char *msg = JavaCPP_getStringBytes(env, str); | |
JavaCPP_exception e(msg); | |
JavaCPP_releaseStringBytes(env, str, msg); | |
env->DeleteLocalRef(str); | |
JavaCPP_detach(attached); | |
throw e; | |
} else { | |
JavaCPP_detach(attached); | |
} | |
} | |
JNIEXPORT void JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate(JNIEnv* env, jobject obj) { | |
obj = env->NewWeakGlobalRef(obj); | |
if (obj == NULL) { | |
JavaCPP_log("Error creating global reference of dev.atsushieno.libremidi_javacpp.libremidi_midi_configuration.Callback_Pointer_IntPointer_long instance for callback."); | |
return; | |
} | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long* rptr = new (std::nothrow) JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long; | |
if (rptr != NULL) { | |
rptr->obj = obj; | |
JavaCPP_initPointer(env, obj, rptr, 1, rptr, &JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_deallocate); | |
for (int i = 0; i < 10; i++) { | |
if (JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[i].obj == NULL) { | |
rptr->ptr = JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_allocate_callbacks[i]; | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_instances[i] = *rptr; | |
break; | |
} | |
} | |
} | |
} | |
JNIEXPORT void JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_call(JNIEnv* env, jobject obj, jobject arg0, jobject arg1, jlong arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long* ptr = (JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return; | |
} | |
if (ptr->ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This function pointer address is NULL."); | |
return; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
char* ptr0 = arg0 == NULL ? NULL : (char*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
signed char* ptr1 = arg1 == NULL ? NULL : (signed char*)jlong_to_ptr(env->GetLongField(arg1, JavaCPP_addressFID)); | |
jlong position1 = arg1 == NULL ? 0 : env->GetLongField(arg1, JavaCPP_positionFID); | |
ptr1 += position1; | |
jthrowable exc = NULL; | |
try { | |
(*ptr->ptr)(ptr0, (const midi1_symbol*)ptr1, (size_t)arg2); | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback(void* arg0, const midi1_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[0](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback1(void* arg0, const midi1_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[1](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback2(void* arg0, const midi1_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[2](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback3(void* arg0, const midi1_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[3](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback4(void* arg0, const midi1_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[4](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback5(void* arg0, const midi1_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[5](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback6(void* arg0, const midi1_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[6](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback7(void* arg0, const midi1_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[7](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback8(void* arg0, const midi1_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[8](arg0, arg1, arg2); | |
} | |
JNIEXPORT void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback9(void* arg0, const midi1_symbol* arg1, size_t arg2) { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[9](arg0, arg1, arg2); | |
} | |
static void (*JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callbacks[10])(void* arg0, const midi1_symbol* arg1, size_t arg2) = { | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback1, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback2, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback3, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback4, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback5, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback6, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback7, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback8, | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callback9 }; | |
void JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long::operator()(void* arg0, const midi1_symbol* arg1, size_t arg2) { | |
jthrowable exc = NULL; | |
JNIEnv* env; | |
bool attached = JavaCPP_getEnv(&env); | |
if (env == NULL) { | |
goto end; | |
} | |
{ | |
jvalue args[3]; | |
jobject obj0 = NULL; | |
void* ptr0 = NULL; | |
ptr0 = (void*)arg0; | |
if (ptr0 != NULL) { | |
obj0 = JavaCPP_createPointer(env, 0); | |
} | |
if (obj0 != NULL) { | |
env->SetLongField(obj0, JavaCPP_addressFID, ptr_to_jlong(ptr0)); | |
} | |
args[0].l = obj0; | |
jobject obj1 = NULL; | |
signed char* ptr1 = NULL; | |
ptr1 = (signed char*)arg1; | |
if (ptr1 != NULL) { | |
obj1 = JavaCPP_createPointer(env, 17); | |
} | |
if (obj1 != NULL) { | |
env->SetLongField(obj1, JavaCPP_addressFID, ptr_to_jlong(ptr1)); | |
} | |
args[1].l = obj1; | |
args[2].j = (jlong)arg2; | |
if (obj == NULL) { | |
obj = JavaCPP_createPointer(env, 18); | |
obj = obj == NULL ? NULL : env->NewGlobalRef(obj); | |
if (obj == NULL) { | |
JavaCPP_log("Error creating global reference of dev.atsushieno.libremidi_javacpp.libremidi_midi_configuration.Callback_Pointer_BytePointer_long instance for callback."); | |
} else { | |
env->SetLongField(obj, JavaCPP_addressFID, ptr_to_jlong(this)); | |
} | |
for (int i = 0; i < 10; i++) { | |
if (this == &JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[i]) { | |
ptr = JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callbacks[i]; | |
break; | |
} | |
} | |
} | |
if (mid == NULL) { | |
mid = JavaCPP_getMethodID(env, 18, "call", "(Lorg/bytedeco/javacpp/Pointer;Lorg/bytedeco/javacpp/BytePointer;J)V"); | |
} | |
if (obj == NULL) { | |
JavaCPP_log("Function pointer object is NULL in callback for dev.atsushieno.libremidi_javacpp.libremidi_midi_configuration.Callback_Pointer_BytePointer_long."); | |
} else if (mid == NULL) { | |
JavaCPP_log("Error getting method ID of function caller \"public native void dev.atsushieno.libremidi_javacpp.libremidi_midi_configuration$Callback_Pointer_BytePointer_long.call(org.bytedeco.javacpp.Pointer,org.bytedeco.javacpp.BytePointer,long)\" for callback."); | |
} else { | |
env->CallVoidMethodA(obj, mid, args); | |
if ((exc = env->ExceptionOccurred()) != NULL) { | |
env->ExceptionClear(); | |
} | |
} | |
env->DeleteLocalRef(obj0); | |
env->DeleteLocalRef(obj1); | |
} | |
end: | |
if (exc != NULL) { | |
jstring str = (jstring)env->CallObjectMethod(exc, JavaCPP_toStringMID); | |
env->DeleteLocalRef(exc); | |
const char *msg = JavaCPP_getStringBytes(env, str); | |
JavaCPP_exception e(msg); | |
JavaCPP_releaseStringBytes(env, str, msg); | |
env->DeleteLocalRef(str); | |
JavaCPP_detach(attached); | |
throw e; | |
} else { | |
JavaCPP_detach(attached); | |
} | |
} | |
JNIEXPORT void JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate(JNIEnv* env, jobject obj) { | |
obj = env->NewWeakGlobalRef(obj); | |
if (obj == NULL) { | |
JavaCPP_log("Error creating global reference of dev.atsushieno.libremidi_javacpp.libremidi_midi_configuration.Callback_Pointer_BytePointer_long instance for callback."); | |
return; | |
} | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long* rptr = new (std::nothrow) JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long; | |
if (rptr != NULL) { | |
rptr->obj = obj; | |
JavaCPP_initPointer(env, obj, rptr, 1, rptr, &JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_deallocate); | |
for (int i = 0; i < 10; i++) { | |
if (JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[i].obj == NULL) { | |
rptr->ptr = JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_allocate_callbacks[i]; | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_instances[i] = *rptr; | |
break; | |
} | |
} | |
} | |
} | |
JNIEXPORT void JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_allocateArray(JNIEnv* env, jobject obj, jlong arg0) { | |
jthrowable exc = NULL; | |
try { | |
libremidi_midi_configuration* rptr = new libremidi_midi_configuration[arg0]; | |
jlong rcapacity = arg0; | |
JavaCPP_initPointer(env, obj, rptr, rcapacity, rptr, &JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_deallocateArray); | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
} | |
JNIEXPORT void JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_allocate(JNIEnv* env, jobject obj) { | |
jthrowable exc = NULL; | |
try { | |
libremidi_midi_configuration* rptr = new libremidi_midi_configuration(); | |
jlong rcapacity = 1; | |
JavaCPP_initPointer(env, obj, rptr, rcapacity, rptr, &JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_deallocate); | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_on_1midi1_1message_1context__(JNIEnv* env, jobject obj) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = NULL; | |
void* rptr; | |
rptr = ptr->on_midi1_message.context; | |
if (rptr != NULL) { | |
rarg = JavaCPP_createPointer(env, 0); | |
if (rarg != NULL) { | |
env->SetLongField(rarg, JavaCPP_addressFID, ptr_to_jlong(rptr)); | |
} | |
} | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_on_1midi1_1message_1context__Lorg_bytedeco_javacpp_Pointer_2(JNIEnv* env, jobject obj, jobject arg0) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
char* ptr0 = arg0 == NULL ? NULL : (char*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
jobject rarg = obj; | |
ptr->on_midi1_message.context = ptr0; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_on_1midi1_1message_1callback__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_2(JNIEnv* env, jobject obj, jobject arg0) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long* ptr0 = arg0 == NULL ? NULL : (JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
jobject rarg = obj; | |
ptr->on_midi1_message.callback = (ptr0 == NULL ? NULL : ptr0->ptr); | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_on_1midi1_1message_1callback__(JNIEnv* env, jobject obj) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = NULL; | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long* rptr; | |
rptr = new (std::nothrow) JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long; | |
if (rptr != NULL) rptr->ptr = ptr->on_midi1_message.callback; | |
jlong rcapacity = 1; | |
void* rowner = (void*)rptr; | |
void (*deallocator)(void*) = &JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1BytePointer_1long_deallocate; | |
if (rptr != NULL) { | |
rarg = JavaCPP_createPointer(env, 18); | |
if (rarg != NULL) { | |
JavaCPP_initPointer(env, rarg, rptr, rcapacity, rowner, deallocator); | |
} | |
} | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_on_1midi2_1message_1context__(JNIEnv* env, jobject obj) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = NULL; | |
void* rptr; | |
rptr = ptr->on_midi2_message.context; | |
if (rptr != NULL) { | |
rarg = JavaCPP_createPointer(env, 0); | |
if (rarg != NULL) { | |
env->SetLongField(rarg, JavaCPP_addressFID, ptr_to_jlong(rptr)); | |
} | |
} | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_on_1midi2_1message_1context__Lorg_bytedeco_javacpp_Pointer_2(JNIEnv* env, jobject obj, jobject arg0) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
char* ptr0 = arg0 == NULL ? NULL : (char*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
jobject rarg = obj; | |
ptr->on_midi2_message.context = ptr0; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_on_1midi2_1message_1callback__(JNIEnv* env, jobject obj) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = NULL; | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long* rptr; | |
rptr = new (std::nothrow) JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long; | |
if (rptr != NULL) rptr->ptr = ptr->on_midi2_message.callback; | |
jlong rcapacity = 1; | |
void* rowner = (void*)rptr; | |
void (*deallocator)(void*) = &JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_deallocate; | |
if (rptr != NULL) { | |
rarg = JavaCPP_createPointer(env, 16); | |
if (rarg != NULL) { | |
JavaCPP_initPointer(env, rarg, rptr, rcapacity, rowner, deallocator); | |
} | |
} | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_on_1midi2_1message_1callback__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long_2(JNIEnv* env, jobject obj, jobject arg0) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long* ptr0 = arg0 == NULL ? NULL : (JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1IntPointer_1long*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
jobject rarg = obj; | |
ptr->on_midi2_message.callback = (ptr0 == NULL ? NULL : ptr0->ptr); | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_get_1timestamp_1context__(JNIEnv* env, jobject obj) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = NULL; | |
void* rptr; | |
rptr = ptr->get_timestamp.context; | |
if (rptr != NULL) { | |
rarg = JavaCPP_createPointer(env, 0); | |
if (rarg != NULL) { | |
env->SetLongField(rarg, JavaCPP_addressFID, ptr_to_jlong(rptr)); | |
} | |
} | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_get_1timestamp_1context__Lorg_bytedeco_javacpp_Pointer_2(JNIEnv* env, jobject obj, jobject arg0) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
char* ptr0 = arg0 == NULL ? NULL : (char*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
jobject rarg = obj; | |
ptr->get_timestamp.context = ptr0; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_get_1timestamp_1callback__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_2(JNIEnv* env, jobject obj, jobject arg0) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long* ptr0 = arg0 == NULL ? NULL : (JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
jobject rarg = obj; | |
ptr->get_timestamp.callback = (ptr0 == NULL ? NULL : ptr0->ptr); | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_get_1timestamp_1callback__(JNIEnv* env, jobject obj) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = NULL; | |
JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long* rptr; | |
rptr = new (std::nothrow) JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long; | |
if (rptr != NULL) rptr->ptr = ptr->get_timestamp.callback; | |
jlong rcapacity = 1; | |
void* rowner = (void*)rptr; | |
void (*deallocator)(void*) = &JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_00024Callback_1Pointer_1long_deallocate; | |
if (rptr != NULL) { | |
rarg = JavaCPP_createPointer(env, 14); | |
if (rarg != NULL) { | |
JavaCPP_initPointer(env, rarg, rptr, rcapacity, rowner, deallocator); | |
} | |
} | |
return rarg; | |
} | |
JNIEXPORT jboolean JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_virtual_1port__(JNIEnv* env, jobject obj) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jboolean rarg = 0; | |
bool rval = (bool)ptr->virtual_port; | |
rarg = (jboolean)rval; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_virtual_1port__Z(JNIEnv* env, jobject obj, jboolean arg0) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = obj; | |
ptr->virtual_port = (bool)arg0; | |
return rarg; | |
} | |
JNIEXPORT jboolean JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_ignore_1sysex__(JNIEnv* env, jobject obj) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jboolean rarg = 0; | |
bool rval = (bool)ptr->ignore_sysex; | |
rarg = (jboolean)rval; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_ignore_1sysex__Z(JNIEnv* env, jobject obj, jboolean arg0) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = obj; | |
ptr->ignore_sysex = (bool)arg0; | |
return rarg; | |
} | |
JNIEXPORT jboolean JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_ignore_1timing__(JNIEnv* env, jobject obj) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jboolean rarg = 0; | |
bool rval = (bool)ptr->ignore_timing; | |
rarg = (jboolean)rval; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_ignore_1timing__Z(JNIEnv* env, jobject obj, jboolean arg0) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = obj; | |
ptr->ignore_timing = (bool)arg0; | |
return rarg; | |
} | |
JNIEXPORT jboolean JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_ignore_1sensing__(JNIEnv* env, jobject obj) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jboolean rarg = 0; | |
bool rval = (bool)ptr->ignore_sensing; | |
rarg = (jboolean)rval; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_ignore_1sensing__Z(JNIEnv* env, jobject obj, jboolean arg0) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = obj; | |
ptr->ignore_sensing = (bool)arg0; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_port_1name__Lorg_bytedeco_javacpp_BytePointer_2(JNIEnv* env, jobject obj, jobject arg0) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
signed char* ptr0 = arg0 == NULL ? NULL : (signed char*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jlong position0 = arg0 == NULL ? 0 : env->GetLongField(arg0, JavaCPP_positionFID); | |
ptr0 += position0; | |
jobject rarg = obj; | |
ptr->port_name = (const char*)ptr0; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_port_1name__(JNIEnv* env, jobject obj) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = NULL; | |
const char* rptr; | |
rptr = (const char*)ptr->port_name; | |
if (rptr != NULL) { | |
rarg = JavaCPP_createPointer(env, 17); | |
if (rarg != NULL) { | |
env->SetLongField(rarg, JavaCPP_addressFID, ptr_to_jlong(rptr)); | |
} | |
} | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_timestamps__I(JNIEnv* env, jobject obj, jint arg0) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = obj; | |
ptr->timestamps = (libremidi_timestamp_mode)arg0; | |
return rarg; | |
} | |
JNIEXPORT jint JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_timestamps__(JNIEnv* env, jobject obj) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jint rarg = 0; | |
libremidi_timestamp_mode rval = (libremidi_timestamp_mode)ptr->timestamps; | |
rarg = (jint)rval; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_out_1port__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1out_1port_2(JNIEnv* env, jobject obj, jobject arg0) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
libremidi_midi_out_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_out_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jobject rarg = obj; | |
ptr->out_port = ptr0; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_out_1port__(JNIEnv* env, jobject obj) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = NULL; | |
libremidi_midi_out_port* rptr; | |
rptr = ptr->out_port; | |
if (rptr != NULL) { | |
rarg = JavaCPP_createPointer(env, 11); | |
if (rarg != NULL) { | |
env->SetLongField(rarg, JavaCPP_addressFID, ptr_to_jlong(rptr)); | |
} | |
} | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_in_1port__Ldev_atsushieno_libremidi_1javacpp_libremidi_1midi_1in_1port_2(JNIEnv* env, jobject obj, jobject arg0) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
libremidi_midi_in_port* ptr0 = arg0 == NULL ? NULL : (libremidi_midi_in_port*)jlong_to_ptr(env->GetLongField(arg0, JavaCPP_addressFID)); | |
jobject rarg = obj; | |
ptr->in_port = ptr0; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1midi_1configuration_in_1port__(JNIEnv* env, jobject obj) { | |
libremidi_midi_configuration* ptr = (libremidi_midi_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = NULL; | |
libremidi_midi_in_port* rptr; | |
rptr = ptr->in_port; | |
if (rptr != NULL) { | |
rarg = JavaCPP_createPointer(env, 9); | |
if (rarg != NULL) { | |
env->SetLongField(rarg, JavaCPP_addressFID, ptr_to_jlong(rptr)); | |
} | |
} | |
return rarg; | |
} | |
JNIEXPORT void JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_allocateArray(JNIEnv* env, jobject obj, jlong arg0) { | |
jthrowable exc = NULL; | |
try { | |
libremidi_observer_configuration* rptr = new libremidi_observer_configuration[arg0]; | |
jlong rcapacity = arg0; | |
JavaCPP_initPointer(env, obj, rptr, rcapacity, rptr, &JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_deallocateArray); | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
} | |
JNIEXPORT void JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_allocate(JNIEnv* env, jobject obj) { | |
jthrowable exc = NULL; | |
try { | |
libremidi_observer_configuration* rptr = new libremidi_observer_configuration(); | |
jlong rcapacity = 1; | |
JavaCPP_initPointer(env, obj, rptr, rcapacity, rptr, &JavaCPP_dev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_deallocate); | |
} catch (...) { | |
exc = JavaCPP_handleException(env, 8); | |
} | |
if (exc != NULL) { | |
env->Throw(exc); | |
} | |
} | |
JNIEXPORT jboolean JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_notify_1in_1constructor__(JNIEnv* env, jobject obj) { | |
libremidi_observer_configuration* ptr = (libremidi_observer_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jboolean rarg = 0; | |
bool rval = (bool)ptr->notify_in_constructor; | |
rarg = (jboolean)rval; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_notify_1in_1constructor__Z(JNIEnv* env, jobject obj, jboolean arg0) { | |
libremidi_observer_configuration* ptr = (libremidi_observer_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = obj; | |
ptr->notify_in_constructor = (bool)arg0; | |
return rarg; | |
} | |
JNIEXPORT jboolean JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_track_1virtual__(JNIEnv* env, jobject obj) { | |
libremidi_observer_configuration* ptr = (libremidi_observer_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jboolean rarg = 0; | |
bool rval = (bool)ptr->track_virtual; | |
rarg = (jboolean)rval; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_track_1virtual__Z(JNIEnv* env, jobject obj, jboolean arg0) { | |
libremidi_observer_configuration* ptr = (libremidi_observer_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = obj; | |
ptr->track_virtual = (bool)arg0; | |
return rarg; | |
} | |
JNIEXPORT jboolean JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_track_1hardware__(JNIEnv* env, jobject obj) { | |
libremidi_observer_configuration* ptr = (libremidi_observer_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jboolean rarg = 0; | |
bool rval = (bool)ptr->track_hardware; | |
rarg = (jboolean)rval; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_track_1hardware__Z(JNIEnv* env, jobject obj, jboolean arg0) { | |
libremidi_observer_configuration* ptr = (libremidi_observer_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = obj; | |
ptr->track_hardware = (bool)arg0; | |
return rarg; | |
} | |
JNIEXPORT jboolean JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_track_1any__(JNIEnv* env, jobject obj) { | |
libremidi_observer_configuration* ptr = (libremidi_observer_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jboolean rarg = 0; | |
bool rval = (bool)ptr->track_any; | |
rarg = (jboolean)rval; | |
return rarg; | |
} | |
JNIEXPORT jobject JNICALL Java_dev_atsushieno_libremidi_1javacpp_libremidi_1observer_1configuration_track_1any__Z(JNIEnv* env, jobject obj, jboolean arg0) { | |
libremidi_observer_configuration* ptr = (libremidi_observer_configuration*)jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID)); | |
if (ptr == NULL) { | |
env->ThrowNew(JavaCPP_getClass(env, 7), "This pointer address is NULL."); | |
return 0; | |
} | |
jlong position = env->GetLongField(obj, JavaCPP_positionFID); | |
ptr += position; | |
jobject rarg = obj; | |
ptr->track_any = (bool)arg0; | |
return rarg; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment