fix: actually set Listener & Buffer GUID's
This commit is contained in:
parent
9ecf595bd4
commit
7a2acd569d
|
@ -45,12 +45,6 @@
|
||||||
*/
|
*/
|
||||||
public abstract class BaseEAX {
|
public abstract class BaseEAX {
|
||||||
|
|
||||||
/** GUID for buffer */
|
|
||||||
public static int BUFFER_GUID;
|
|
||||||
|
|
||||||
/** GUID for listener */
|
|
||||||
public static int LISTENER_GUID;
|
|
||||||
|
|
||||||
/** Has the EAX object been created? */
|
/** Has the EAX object been created? */
|
||||||
protected static boolean created;
|
protected static boolean created;
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,12 @@
|
||||||
*/
|
*/
|
||||||
public class CoreEAX extends BaseEAX implements BaseEAXConstants {
|
public class CoreEAX extends BaseEAX implements BaseEAXConstants {
|
||||||
|
|
||||||
|
/** GUID for buffer */
|
||||||
|
public static int BUFFER_GUID;
|
||||||
|
|
||||||
|
/** GUID for listener */
|
||||||
|
public static int LISTENER_GUID;
|
||||||
|
|
||||||
/** Creates a new instance of CoreEAX */
|
/** Creates a new instance of CoreEAX */
|
||||||
public CoreEAX() {
|
public CoreEAX() {
|
||||||
}
|
}
|
||||||
|
@ -50,6 +56,7 @@ public class CoreEAX extends BaseEAX implements BaseEAXConstants {
|
||||||
*/
|
*/
|
||||||
protected void init() {
|
protected void init() {
|
||||||
determineAvailableExtensions();
|
determineAvailableExtensions();
|
||||||
|
setGUID();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,6 +64,11 @@ public class CoreEAX extends BaseEAX implements BaseEAXConstants {
|
||||||
*/
|
*/
|
||||||
protected native void determineAvailableExtensions();
|
protected native void determineAvailableExtensions();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the GUID's for the buffer and listener objects
|
||||||
|
*/
|
||||||
|
protected native void setGUID();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves an EAX Value
|
* Retrieves an EAX Value
|
||||||
*
|
*
|
||||||
|
|
|
@ -50,6 +50,14 @@ extern "C" {
|
||||||
JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreEAX_determineAvailableExtensions
|
JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreEAX_determineAvailableExtensions
|
||||||
(JNIEnv *, jobject);
|
(JNIEnv *, jobject);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_lwjgl_openal_CoreEAX
|
||||||
|
* Method: setGUID
|
||||||
|
* Signature: ()V
|
||||||
|
*/
|
||||||
|
JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreEAX_setGUID
|
||||||
|
(JNIEnv *, jobject);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Class: org_lwjgl_openal_CoreEAX
|
* Class: org_lwjgl_openal_CoreEAX
|
||||||
* Method: eaxGet
|
* Method: eaxGet
|
||||||
|
|
|
@ -104,6 +104,21 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreEAX_determineAvailableExtension
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreEAX_setGUID (JNIEnv *env, jobject obj) {
|
||||||
|
#ifdef _WIN32
|
||||||
|
//get class/fields
|
||||||
|
jclass eax_class = env->FindClass("org/lwjgl/openal/CoreEAX");
|
||||||
|
jfieldID eaxBuffer_field = env->GetStaticFieldID(eax_class, "BUFFER_GUID", "I");
|
||||||
|
jfieldID eaxListener_field = env->GetStaticFieldID(eax_class, "LISTENER_GUID", "I");
|
||||||
|
|
||||||
|
//set fields
|
||||||
|
env->SetStaticIntField(eax_class, eaxBuffer_field, (jint) &DSPROPSETID_EAX20_BufferProperties);
|
||||||
|
env->SetStaticIntField(eax_class, eaxListener_field, (jint) &DSPROPSETID_EAX20_ListenerProperties);
|
||||||
|
#else
|
||||||
|
ThrowException(env, "EAX extensions not supported");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function retrieves an EAX value.
|
* This function retrieves an EAX value.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue