aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alState.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-23 18:25:59 -0800
committerChris Robinson <[email protected]>2018-01-23 18:25:59 -0800
commitcaa3b4f7f833278498a78f261e8badb85fd2896b (patch)
tree8f733392944198cb06e17aad5b9db67b79fc4d64 /OpenAL32/alState.c
parent2266a9e01ef68f112e87eb49bf1621a6456531a9 (diff)
Handle event properties
This just implements the event methods insofar as tracked state. No events are generated/reported yet.
Diffstat (limited to 'OpenAL32/alState.c')
-rw-r--r--OpenAL32/alState.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c
index c8c81065..36afd46e 100644
--- a/OpenAL32/alState.c
+++ b/OpenAL32/alState.c
@@ -415,6 +415,64 @@ done:
return value;
}
+AL_API void* AL_APIENTRY alGetPointerSOFT(ALenum pname)
+{
+ ALCcontext *context;
+ void *value = NULL;
+
+ context = GetContextRef();
+ if(!context) return NULL;
+
+ switch(pname)
+ {
+ case AL_EVENT_CALLBACK_FUNCTION_SOFT:
+ value = context->EventCb;
+ break;
+
+ case AL_EVENT_CALLBACK_USER_PARAM_SOFT:
+ value = context->EventParam;
+ break;
+
+ default:
+ SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done);
+ }
+
+done:
+ ALCcontext_DecRef(context);
+
+ return value;
+}
+
+AL_API void AL_APIENTRY alGetPointervSOFT(ALenum pname, void **values)
+{
+ ALCcontext *context;
+
+ if(values)
+ {
+ switch(pname)
+ {
+ case AL_EVENT_CALLBACK_FUNCTION_SOFT:
+ case AL_EVENT_CALLBACK_USER_PARAM_SOFT:
+ values[0] = alGetPointerSOFT(pname);
+ return;
+ }
+ }
+
+ context = GetContextRef();
+ if(!context) return;
+
+ if(!(values))
+ SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
+ switch(pname)
+ {
+ default:
+ SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done);
+ }
+
+done:
+ ALCcontext_DecRef(context);
+}
+
AL_API ALvoid AL_APIENTRY alGetBooleanv(ALenum pname, ALboolean *values)
{
ALCcontext *context;