aboutsummaryrefslogtreecommitdiffstats
path: root/src/native
diff options
context:
space:
mode:
Diffstat (limited to 'src/native')
-rw-r--r--src/native/almisc.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/native/almisc.c b/src/native/almisc.c
index 06fa794..22689b6 100644
--- a/src/native/almisc.c
+++ b/src/native/almisc.c
@@ -10,12 +10,9 @@
#endif
#include "efx.h"
#include <string.h>
-#include <stdbool.h>
extern int strlen_alc(ALCdevice *device, int param, const char* str);
-extern bool alc_is_double_null_terminated_string(ALCdevice *device, int param);
-
/* Java->C glue code:
* Java package: jogamp.openal.ALImpl
* Java method: long dispatch_alGetProcAddressStatic(java.lang.String fname)
@@ -53,22 +50,13 @@ Java_jogamp_openal_ALCImpl_dispatch_1alcGetStringImpl1(JNIEnv *env, jobject _unu
LPALCGETSTRING ptr_alcGetString;
ALCdevice * _device_ptr = NULL;
const ALCchar * _res;
- if ( NULL != device ) {
- _device_ptr = (ALCdevice *) (((char*) (*env)->GetDirectBufferAddress(env, device)) + 0);
- }
+ if ( NULL != device ) {
+ _device_ptr = (ALCdevice *) (((char*) (*env)->GetDirectBufferAddress(env, device)) + 0);
+ }
ptr_alcGetString = (LPALCGETSTRING) (intptr_t) procAddress;
assert(ptr_alcGetString != NULL);
_res = (* ptr_alcGetString) ((ALCdevice *) _device_ptr, (ALCenum) param);
if (NULL == _res) return NULL;
- return (*env)->NewDirectByteBuffer(env, _res, strlen_alc(_device_ptr, param, _res));
+ return (*env)->NewDirectByteBuffer(env, (void*)_res, strlen_alc(_device_ptr, param, _res));
}
-JNIEXPORT jboolean JNICALL
-Java_jogamp_openal_ALCImpl_dispatch_1alcIsDoubleNullTerminatedString(JNIEnv *env, jobject _unused, jobject device, jint param) {
- ALCdevice * _device_ptr = NULL;
- const ALCchar * _res;
- if ( NULL != device ) {
- _device_ptr = (ALCdevice *) (((char*) (*env)->GetDirectBufferAddress(env, device)) + 0);
- }
- return (jboolean) alc_is_double_null_terminated_string((ALCdevice *) _device_ptr, (ALCenum) param);
-}