diff options
Diffstat (limited to 'src/native/almisc.c')
-rw-r--r-- | src/native/almisc.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/native/almisc.c b/src/native/almisc.c index ca638d9..22689b6 100644 --- a/src/native/almisc.c +++ b/src/native/almisc.c @@ -1,16 +1,15 @@ - #include <jni.h> #include <stdlib.h> #include <assert.h> - #include "al.h" - #include "alc.h" - #ifndef _MSC_VER /* Non-Windows platforms */ +#include "al.h" +#include "alc.h" +#ifndef _MSC_VER /* Non-Windows platforms */ #define __cdecl /* Trim non-standard keyword */ - #endif - #include "efx.h" - #include <string.h> +#endif +#include "efx.h" +#include <string.h> extern int strlen_alc(ALCdevice *device, int param, const char* str); @@ -51,13 +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)); } |