fixed issues with typecasting of buffer type

This commit is contained in:
Brian Matzon 2007-05-20 17:44:59 +00:00
parent fc845268e6
commit fc770dc67e

View file

@ -107,7 +107,7 @@ static void JNICALL Java_org_lwjgl_openal_ALC11_nalcCaptureStop(JNIEnv * env, jc
* Signature: (JLjava/nio/ByteBuffer;I)V
*/
static void JNICALL Java_org_lwjgl_openal_ALC11_nalcCaptureSamples(JNIEnv *env, jclass clazz, jlong device, jobject buffer, jint position, jint samples) {
ALuint *buffer_address = ((ALuint *)(*env)->GetDirectBufferAddress(env, buffer)) + position;
ALvoid *buffer_address = ((ALbyte *)(*env)->GetDirectBufferAddress(env, buffer)) + position;
alcCaptureSamples((ALCdevice*) ((intptr_t)device), buffer_address, samples);
}