aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.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 /Alc/ALc.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 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 0d8bbe86..aa4634a0 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -287,6 +287,11 @@ static const struct {
DECL(alMapBufferSOFT),
DECL(alUnmapBufferSOFT),
DECL(alFlushMappedBufferSOFT),
+
+ DECL(alEventControlSOFT),
+ DECL(alEventCallbackSOFT),
+ DECL(alGetPointerSOFT),
+ DECL(alGetPointervSOFT),
};
#undef DECL
@@ -653,6 +658,13 @@ static const struct {
DECL(AL_MAP_WRITE_BIT_SOFT),
DECL(AL_MAP_PERSISTENT_BIT_SOFT),
DECL(AL_PRESERVE_DATA_BIT_SOFT),
+
+ DECL(AL_EVENT_CALLBACK_FUNCTION_SOFT),
+ DECL(AL_EVENT_CALLBACK_USER_PARAM_SOFT),
+ DECL(AL_EVENT_TYPE_BUFFER_COMPLETED_SOFT),
+ DECL(AL_EVENT_TYPE_SOURCE_STATE_CHANGED_SOFT),
+ DECL(AL_EVENT_TYPE_ERROR_SOFT),
+ DECL(AL_EVENT_TYPE_PERFORMANCE_SOFT),
};
#undef DECL
@@ -2534,6 +2546,10 @@ static ALvoid InitContext(ALCcontext *Context)
Context->MetersPerUnit = AL_DEFAULT_METERS_PER_UNIT;
ATOMIC_FLAG_TEST_AND_SET(&Context->PropsClean, almemory_order_relaxed);
ATOMIC_INIT(&Context->DeferUpdates, AL_FALSE);
+ almtx_init(&Context->EventLock, almtx_plain);
+ Context->EnabledEvts = 0;
+ Context->EventCb = NULL;
+ Context->EventParam = NULL;
ATOMIC_INIT(&Context->Update, NULL);
ATOMIC_INIT(&Context->FreeContextProps, NULL);
@@ -2662,6 +2678,8 @@ static void FreeContext(ALCcontext *context)
}
TRACE("Freed "SZFMT" listener property object%s\n", count, (count==1)?"":"s");
+ almtx_destroy(&context->EventLock);
+
ALCdevice_DecRef(context->Device);
context->Device = NULL;