Update of /cvsroot/java-game-lib/LWJGL/src/native/win32
In directory usw-pr-cvs1:/tmp/cvs-serv7032
Modified Files:
org_lwjgl_openal_CoreAL.cpp
Log Message:
fix: now using ByteBuffer all the way
Index: org_lwjgl_openal_CoreAL.cpp
CVS Browser:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_openal_CoreAL.cpp
===================================================================
RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_openal_CoreAL.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- org_lwjgl_openal_CoreAL.cpp 26 Aug 2002 18:23:11 -0000 1.3
+++ org_lwjgl_openal_CoreAL.cpp 29 Aug 2002 01:09:22 -0000 1.4
@@ -354,10 +354,8 @@
* C Specification:
* ALvoid alGenSources(ALsizei n,ALuint *sources);
*/
-JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_genSources (JNIEnv *env, jobject obj, jint n, jintArray sources) {
- int* array = (int*) env->GetIntArrayElements(sources, 0);
- alGenSources(n, (ALuint*) array);
- env->ReleaseIntArrayElements(sources, (jint*) array, 0);
+JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_genSources (JNIEnv *env, jobject obj, jint n, jint sources) {
+ alGenSources(n, (ALuint*) sources);
CHECK_AL_ERROR
}
@@ -367,10 +365,8 @@
* C Specification:
* ALvoid alDeleteSources(ALsizei n,ALuint *sources);
*/
-JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_deleteSources (JNIEnv *env, jobject obj, jint n, jintArray source) {
- int* array = (int*) env->GetIntArrayElements(source, 0);
- alDeleteSources(n, (ALuint*) array);
- env->ReleaseIntArrayElements(source, (jint*) array, 0);
+JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_deleteSources (JNIEnv *env, jobject obj, jint n, jint sources) {
+ alDeleteSources(n, (ALuint*) sources);
CHECK_AL_ERROR
}
@@ -479,10 +475,8 @@
* C Specification:
* ALvoid alSourcePlayv(ALsizei n,ALuint *sources);
*/
-JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourcePlayv (JNIEnv *env, jobject obj, jint n, jintArray sources) {
- int* array = (int*) env->GetIntArrayElements(sources, 0);
- alSourcePlayv(n, (ALuint*) array);
- env->ReleaseIntArrayElements(sources, (jint*) array, 0);
+JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourcePlayv (JNIEnv *env, jobject obj, jint n, jint sources) {
+ alSourcePlayv(n, (ALuint*) sources);
CHECK_AL_ERROR
}
@@ -492,10 +486,8 @@
* C Specification:
* ALvoid alSourcePausev(ALsizei n,ALuint *sources);
*/
-JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourcePausev (JNIEnv *env, jobject obj, jint n, jintArray sources) {
- int* array = (int*) env->GetIntArrayElements(sources, 0);
- alSourcePausev(n, (ALuint*) array);
- env->ReleaseIntArrayElements(sources, (jint*) array, 0);
+JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourcePausev (JNIEnv *env, jobject obj, jint n, jint sources) {
+ alSourcePausev(n, (ALuint*) sources);
CHECK_AL_ERROR
}
@@ -505,10 +497,8 @@
* C Specification:
* ALvoid alSourceStopv(ALsizei n,ALuint *sources);
*/
-JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourceStopv (JNIEnv *env, jobject obj, jint n, jintArray sources) {
- int* array = (int*) env->GetIntArrayElements(sources, 0);
- alSourceStopv(n, (ALuint*) array);
- env->ReleaseIntArrayElements(sources, (jint*) array, 0);
+JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourceStopv (JNIEnv *env, jobject obj, jint n, jint sources) {
+ alSourceStopv(n, (ALuint*) sources);
CHECK_AL_ERROR
}
@@ -518,10 +508,8 @@
* C Specification:
* ALvoid alSourceRewindv(ALsizei n,ALuint *sources);
*/
-JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourceRewindv (JNIEnv *env, jobject obj, jint n, jintArray sources) {
- int* array = (int*) env->GetIntArrayElements(sources, 0);
- alSourceRewindv(n, (ALuint*) array);
- env->ReleaseIntArrayElements(sources, (jint*) array, 0);
+JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourceRewindv (JNIEnv *env, jobject obj, jint n, jint sources) {
+ alSourceRewindv(n, (ALuint*) sources);
CHECK_AL_ERROR
}
@@ -575,10 +563,8 @@
* C Specification:
* ALvoid alGenBuffers(ALsizei n,ALuint *buffers);
*/
-JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_genBuffers (JNIEnv *env, jobject obj, jint n, jintArray buffers) {
- int* array = (int*) env->GetIntArrayElements(buffers, 0);
- alGenBuffers(n, (ALuint*) array);
- env->ReleaseIntArrayElements(buffers, (jint*) array, 0);
+JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_genBuffers (JNIEnv *env, jobject obj, jint n, jint buffers) {
+ alGenBuffers(n, (ALuint*) buffers);
CHECK_AL_ERROR
}
@@ -588,10 +574,8 @@
* C Specification:
* ALvoid alDeleteBuffers(ALsizei n,ALuint *buffers);
*/
-JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_deleteBuffers (JNIEnv *env, jobject obj, jint n, jintArray buffer) {
- int* array = (int*) env->GetIntArrayElements(buffer, 0);
- alDeleteBuffers(n, (ALuint*) array);
- env->ReleaseIntArrayElements(buffer, (jint*) array, 0);
+JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_deleteBuffers (JNIEnv *env, jobject obj, jint n, jint buffers) {
+ alDeleteBuffers(n, (ALuint*) buffers);
CHECK_AL_ERROR
}
@@ -647,10 +631,8 @@
* C Specification:
* ALvoid alSourceQueueBuffers( ALuint source, ALsizei n, ALuint* buffers );
*/
-JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourceQueueBuffers (JNIEnv *env, jobject obj, jint source, jint n, jintArray buffers) {
- int* array = (int*) env->GetIntArrayElements(buffers, 0);
- alSourceQueueBuffers((ALuint) source, (ALsizei) n, (ALuint*) array);
- env->ReleaseIntArrayElements(buffers, (jint*) array, 0);
+JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourceQueueBuffers (JNIEnv *env, jobject obj, jint source, jint n, jint buffers) {
+ alSourceQueueBuffers((ALuint) source, (ALsizei) n, (ALuint*) buffers);
CHECK_AL_ERROR
}
@@ -660,10 +642,8 @@
* C Specification:
* ALvoid alSourceUnqueueBuffers( ALuint source, ALsizei n, ALuint* buffers );
*/
-JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourceUnqueueBuffers (JNIEnv *env, jobject obj, jint source, jint n, jintArray buffers) {
- int* array = (int*) env->GetIntArrayElements(buffers, 0);
- alSourceUnqueueBuffers((ALuint) source, (ALsizei) n, (ALuint*) array);
- env->ReleaseIntArrayElements(buffers, (jint*) array, 0);
+JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourceUnqueueBuffers (JNIEnv *env, jobject obj, jint source, jint n, jint buffers) {
+ alSourceUnqueueBuffers((ALuint) source, (ALsizei) n, (ALuint*) buffers);
CHECK_AL_ERROR
}
|