diff options
author | Sven Gothel <[email protected]> | 2023-07-09 16:05:04 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-07-09 16:05:04 +0200 |
commit | 84be97857a080194de8de147552c2adb295bb402 (patch) | |
tree | 28b0b91aa01d1378e15ce4f8aa645dcce4de023d /make | |
parent | 38d03bf5056f7938afcac584bc4321eca49076a1 (diff) |
Add OpenAL extension AL_SOFT_events using userParam ALCcontext as key for GlueGen JavaCallback
https://openal-soft.org/openal-extensions/SOFT_events.txt
Diffstat (limited to 'make')
-rw-r--r-- | make/config/joal-alext.cfg | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | make/config/joal.cfg | 3 | ||||
-rw-r--r-- | make/stub_includes/openal/alext.h | 22 |
3 files changed, 29 insertions, 0 deletions
diff --git a/make/config/joal-alext.cfg b/make/config/joal-alext.cfg index da63612..39bc50e 100644 --- a/make/config/joal-alext.cfg +++ b/make/config/joal-alext.cfg @@ -27,6 +27,10 @@ ForceProcAddressGen __ALL__ # pointer typedefs for these routines to AL_APIENTRY LocalProcAddressCallingConvention __ALL__ AL_APIENTRY +ArgumentIsPascalString ALEVENTPROCSOFT 3 4 +JavaCallbackDef alEventCallbackSOFT 1 ALEVENTPROCSOFT 5 com.jogamp.openal.ALContextKey +JavaCallbackKey alEventCallbackSOFT 1 ALEVENTPROCSOFT 5 + Import java.io.UnsupportedEncodingException Import java.util.* Import com.jogamp.openal.* diff --git a/make/config/joal.cfg b/make/config/joal.cfg index 050c000..f553e9a 100755..100644 --- a/make/config/joal.cfg +++ b/make/config/joal.cfg @@ -21,6 +21,9 @@ ForceProcAddressGen __ALL__ # pointer typedefs for these routines to AL_APIENTRY LocalProcAddressCallingConvention __ALL__ AL_APIENTRY +# JavaCallback requires `JNI_OnLoad*(..)` and `JVMUtil_GetJNIEnv(..)` +LibraryOnLoad joal + Import com.jogamp.openal.* Import jogamp.openal.* Import java.security.AccessController diff --git a/make/stub_includes/openal/alext.h b/make/stub_includes/openal/alext.h index 070e839..3c53033 100644 --- a/make/stub_includes/openal/alext.h +++ b/make/stub_includes/openal/alext.h @@ -338,6 +338,28 @@ AL_API void AL_APIENTRY alGetSourcei64vSOFT(ALuint source, ALenum param, ALint64 #endif #endif +#ifndef AL_SOFT_events +#define AL_SOFT_events 1 +#define AL_EVENT_CALLBACK_FUNCTION_SOFT 0x19A2 +#define AL_EVENT_CALLBACK_USER_PARAM_SOFT 0x19A3 +#define AL_EVENT_TYPE_BUFFER_COMPLETED_SOFT 0x19A4 +#define AL_EVENT_TYPE_SOURCE_STATE_CHANGED_SOFT 0x19A5 +#define AL_EVENT_TYPE_DISCONNECTED_SOFT 0x19A6 +typedef void (AL_APIENTRY*ALEVENTPROCSOFT)(ALenum eventType, ALuint object, ALuint param, + ALsizei length, const ALchar *message, + void *userParam); +typedef void (AL_APIENTRY*LPALEVENTCONTROLSOFT)(ALsizei count, const ALenum *types, ALboolean enable); +typedef void (AL_APIENTRY*LPALEVENTCALLBACKSOFT)(ALEVENTPROCSOFT callback, void *userParam); +typedef void* (AL_APIENTRY*LPALGETPOINTERSOFT)(ALenum pname); +typedef void (AL_APIENTRY*LPALGETPOINTERVSOFT)(ALenum pname, void **values); +#ifdef AL_ALEXT_PROTOTYPES +AL_API void AL_APIENTRY alEventControlSOFT(ALsizei count, const ALenum *types, ALboolean enable); +AL_API void AL_APIENTRY alEventCallbackSOFT(ALEVENTPROCSOFT callback, void *userParam); +AL_API void* AL_APIENTRY alGetPointerSOFT(ALenum pname); +AL_API void AL_APIENTRY alGetPointervSOFT(ALenum pname, void **values); +#endif +#endif + #ifdef __cplusplus } #endif |