expose suspendContext

This commit is contained in:
Brian Matzon 2004-07-11 08:09:34 +00:00
parent e0a93cdd14
commit f618023b3f
2 changed files with 13 additions and 10 deletions

View File

@ -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 <code>alcSuspendContext</code>.
*
* Repeated calls to <code>alcSuspendContext</code> are legal, and do not affect a context that is
* already marked as suspended. The default state of a context created by
* <code>alcCreateContext</code> 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 <code>alcSuspendContext</code>.
*
* Repeated calls to <code>alcSuspendContext</code> are legal, and do not affect a context that is
* already marked as suspended. The default state of a context created by
* <code>alcCreateContext</code> 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 <code>alcMakeCurrent</code> and

View File

@ -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},