diff options
Diffstat (limited to 'al')
-rw-r--r-- | al/event.cpp | 1 | ||||
-rw-r--r-- | al/event.h | 45 |
2 files changed, 1 insertions, 45 deletions
diff --git a/al/event.cpp b/al/event.cpp index 9db36137..ada92e24 100644 --- a/al/event.cpp +++ b/al/event.cpp @@ -21,6 +21,7 @@ #include "alcontext.h" #include "alexcpt.h" #include "almalloc.h" +#include "async_event.h" #include "effects/base.h" #include "inprogext.h" #include "logging.h" @@ -1,52 +1,7 @@ #ifndef AL_EVENT_H #define AL_EVENT_H -#include "almalloc.h" - struct ALCcontext; -struct EffectState; -enum class VChangeState; - -using uint = unsigned int; - - -enum { - /* End event thread processing. */ - EventType_KillThread = 0, - - /* User event types. */ - EventType_SourceStateChange = 1<<0, - EventType_BufferCompleted = 1<<1, - EventType_Disconnected = 1<<2, - - /* Internal events. */ - EventType_ReleaseEffectState = 65536, -}; - -struct AsyncEvent { - uint EnumType{0u}; - union { - char dummy; - struct { - uint id; - VChangeState state; - } srcstate; - struct { - uint id; - uint count; - } bufcomp; - struct { - char msg[244]; - } disconnect; - EffectState *mEffectState; - } u{}; - - AsyncEvent() noexcept = default; - constexpr AsyncEvent(uint type) noexcept : EnumType{type} { } - - DISABLE_ALLOC() -}; - void StartEventThrd(ALCcontext *ctx); void StopEventThrd(ALCcontext *ctx); |