From caa3b4f7f833278498a78f261e8badb85fd2896b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 23 Jan 2018 18:25:59 -0800 Subject: Handle event properties This just implements the event methods insofar as tracked state. No events are generated/reported yet. --- OpenAL32/Include/alMain.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'OpenAL32/Include/alMain.h') diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 4b0f3b81..438f7ed5 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -80,12 +80,12 @@ typedef void (AL_APIENTRY*ALEVENTPROCSOFT)(ALenum eventType, ALuint object, ALui 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 **params); +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 **params); +AL_API void AL_APIENTRY alGetPointervSOFT(ALenum pname, void **values); #endif #endif @@ -565,6 +565,13 @@ struct ALCdevice_struct #define RECORD_THREAD_NAME "alsoft-record" +enum { + EventType_SourceStateChange = 1<<0, + EventType_BufferCompleted = 1<<1, + EventType_Error = 1<<2, + EventType_Performance = 1<<3, +}; + struct ALCcontext_struct { RefCount ref; @@ -612,6 +619,11 @@ struct ALCcontext_struct { ATOMIC(struct ALeffectslotArray*) ActiveAuxSlots; + almtx_t EventLock; + ALbitfieldSOFT EnabledEvts; + ALEVENTPROCSOFT EventCb; + void *EventParam; + /* Default effect slot */ struct ALeffectslot *DefaultSlot; -- cgit v1.2.3