diff --git a/src/java/org/lwjgl/openal/ALC.java b/src/java/org/lwjgl/openal/ALC.java index b28b1cfa..2b31b1f3 100644 --- a/src/java/org/lwjgl/openal/ALC.java +++ b/src/java/org/lwjgl/openal/ALC.java @@ -290,17 +290,20 @@ public class ALC { /** * The application can suspend any context from processing (including the current - * one). To indicate that a context should be suspended from processing (i.e. that - * internal execution state like offset increments is not supposed to be changed), the - * application has to use alcSuspendContext. - * - * Repeated calls to alcSuspendContext are legal, and do not affect a context that is - * already marked as suspended. The default state of a context created by - * alcCreateContext is that it is marked as suspended. + * one). To indicate that a context should be suspended from processing (i.e. that + * internal execution state like offset increments is not supposed to be changed), the + * application has to use alcSuspendContext. + * + * Repeated calls to alcSuspendContext are legal, and do not affect a context that is + * already marked as suspended. The default state of a context created by + * alcCreateContext is that it is marked as suspended. * * @param context address of context to suspend */ - native static void alcSuspendContext(int context); + public static void alcSuspendContext() { + nalcSuspendContext(AL.context.context); + } + native static void nalcSuspendContext(int context); /** * The correct way to destroy a context is to first release it using alcMakeCurrent and diff --git a/src/native/common/org_lwjgl_openal_ALC.cpp b/src/native/common/org_lwjgl_openal_ALC.cpp index eb66611c..dd580db3 100644 --- a/src/native/common/org_lwjgl_openal_ALC.cpp +++ b/src/native/common/org_lwjgl_openal_ALC.cpp @@ -288,7 +288,7 @@ static jobject JNICALL Java_org_lwjgl_openal_ALC_alcGetContextsDevice (JNIEnv *e * C Specification: * void alcSuspendContext(ALCcontext *context); */ -static void JNICALL Java_org_lwjgl_openal_ALC_alcSuspendContext (JNIEnv *env, jclass clazz, jint contextaddress) { +static void JNICALL Java_org_lwjgl_openal_ALC_nalcSuspendContext (JNIEnv *env, jclass clazz, jint contextaddress) { alcSuspendContext((ALCcontext*) contextaddress); } @@ -367,7 +367,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALC_initNativeStubs(JNIEnv *env, jc {"nalcProcessContext", "(I)V", (void*)&Java_org_lwjgl_openal_ALC_nalcProcessContext, "alcProcessContext", (void**)&alcProcessContext}, {"alcGetCurrentContext", "()Lorg/lwjgl/openal/ALCcontext;", (void*)&Java_org_lwjgl_openal_ALC_alcGetCurrentContext, "alcGetCurrentContext", (void**)&alcGetCurrentContext}, {"alcGetContextsDevice", "(I)Lorg/lwjgl/openal/ALCdevice;", (void*)&Java_org_lwjgl_openal_ALC_alcGetContextsDevice, "alcGetContextsDevice", (void**)&alcGetContextsDevice}, - {"alcSuspendContext", "(I)V", (void*)&Java_org_lwjgl_openal_ALC_alcSuspendContext, "alcSuspendContext", (void**)&alcSuspendContext}, + {"nalcSuspendContext", "(I)V", (void*)&Java_org_lwjgl_openal_ALC_nalcSuspendContext, "alcSuspendContext", (void**)&alcSuspendContext}, {"alcDestroyContext", "(I)V", (void*)&Java_org_lwjgl_openal_ALC_alcDestroyContext, "alcDestroyContext", (void**)&alcDestroyContext}, {"nalcGetError", "(I)I", (void*)&Java_org_lwjgl_openal_ALC_nalcGetError, "alcGetError", (void**)&alcGetError}, {"nalcIsExtensionPresent", "(ILjava/lang/String;)Z", (void*)&Java_org_lwjgl_openal_ALC_nalcIsExtensionPresent, "alcIsExtensionPresent", (void**)&alcIsExtensionPresent},