41 |
#include "dssi_data.h" |
#include "dssi_data.h" |
42 |
|
|
43 |
void |
void |
44 |
Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_dlclose_1 (JNIEnv *env, jclass clazz __attribute__((unused)), jlong sohandle) |
Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_dlclose_1 |
45 |
|
(JNIEnv *env, jclass clazz __attribute__((unused)), jlong sohandle) |
46 |
{ |
{ |
47 |
dssi_data *data = (dssi_data *) (long) sohandle; |
dssi_data *data = (dssi_data *) (long) sohandle; |
48 |
dlclose (data->dlhandle); |
dlclose (data->dlhandle); |
50 |
} |
} |
51 |
|
|
52 |
jlong |
jlong |
53 |
Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_dlopen_1 (JNIEnv *env, jclass clazz __attribute__((unused)), jstring name) |
Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_dlopen_1 |
54 |
|
(JNIEnv *env, jclass clazz __attribute__((unused)), jstring name) |
55 |
{ |
{ |
56 |
const char *filename; |
const char *filename; |
57 |
void *handle; |
void *handle; |
60 |
|
|
61 |
filename = JCL_jstring_to_cstring (env, name); |
filename = JCL_jstring_to_cstring (env, name); |
62 |
if (filename == NULL) |
if (filename == NULL) |
63 |
{ |
return (0); |
|
return (0); |
|
|
} |
|
64 |
|
|
65 |
handle = dlopen(filename, RTLD_NOW); |
handle = dlopen(filename, RTLD_NOW); |
66 |
|
|
87 |
} |
} |
88 |
|
|
89 |
jlong |
jlong |
90 |
Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_getDSSIHandle_1 (JNIEnv *env __attribute__((unused)), jclass clazz __attribute__((unused)), jlong handle, jlong index) |
Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_getDSSIHandle_1 |
91 |
|
(JNIEnv *env __attribute__((unused)), |
92 |
|
jclass clazz __attribute__((unused)), jlong handle, jlong index) |
93 |
{ |
{ |
94 |
dssi_data *data = JLONG_TO_PTR(dssi_data,handle); |
dssi_data *data = JLONG_TO_PTR(dssi_data,handle); |
95 |
data->desc = (data->fn)(index); |
data->desc = (data->fn)(index); |
97 |
} |
} |
98 |
|
|
99 |
jstring |
jstring |
100 |
Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_getDSSIName_1 (JNIEnv *env, jclass clazz __attribute__((unused)), jlong handle) |
Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_getDSSIName_1 |
101 |
|
(JNIEnv *env, jclass clazz __attribute__((unused)), jlong handle) |
102 |
{ |
{ |
103 |
DSSI_Descriptor *desc = JLONG_TO_PTR(DSSI_Descriptor,handle); |
DSSI_Descriptor *desc = JLONG_TO_PTR(DSSI_Descriptor,handle); |
104 |
const char *str = desc->LADSPA_Plugin->Name; |
const char *str = desc->LADSPA_Plugin->Name; |
107 |
} |
} |
108 |
|
|
109 |
jstring |
jstring |
110 |
Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_getDSSICopyright_1 (JNIEnv *env, jclass clazz __attribute__((unused)), jlong handle) |
Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_getDSSICopyright_1 |
111 |
|
(JNIEnv *env, jclass clazz __attribute__((unused)), jlong handle) |
112 |
{ |
{ |
113 |
DSSI_Descriptor *desc = JLONG_TO_PTR(DSSI_Descriptor,handle); |
DSSI_Descriptor *desc = JLONG_TO_PTR(DSSI_Descriptor,handle); |
114 |
const char *str = desc->LADSPA_Plugin->Copyright; |
const char *str = desc->LADSPA_Plugin->Copyright; |
117 |
} |
} |
118 |
|
|
119 |
jstring |
jstring |
120 |
Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_getDSSIVendor_1 (JNIEnv *env, jclass clazz __attribute__((unused)), jlong handle) |
Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_getDSSIVendor_1 |
121 |
|
(JNIEnv *env, jclass clazz __attribute__((unused)), jlong handle) |
122 |
{ |
{ |
123 |
DSSI_Descriptor *desc = JLONG_TO_PTR(DSSI_Descriptor,handle); |
DSSI_Descriptor *desc = JLONG_TO_PTR(DSSI_Descriptor,handle); |
124 |
const char *str = desc->LADSPA_Plugin->Maker; |
const char *str = desc->LADSPA_Plugin->Maker; |
127 |
} |
} |
128 |
|
|
129 |
jstring |
jstring |
130 |
Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_getDSSILabel_1 (JNIEnv *env, jclass clazz __attribute__((unused)), jlong handle) |
Java_gnu_javax_sound_midi_dssi_DSSIMidiDeviceProvider_getDSSILabel_1 |
131 |
|
(JNIEnv *env, jclass clazz __attribute__((unused)), jlong handle) |
132 |
{ |
{ |
133 |
DSSI_Descriptor *desc = JLONG_TO_PTR(DSSI_Descriptor,handle); |
DSSI_Descriptor *desc = JLONG_TO_PTR(DSSI_Descriptor,handle); |
134 |
const char *str = desc->LADSPA_Plugin->Label; |
const char *str = desc->LADSPA_Plugin->Label; |