diff options
author | Chris Robinson <[email protected]> | 2020-12-16 13:58:23 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-12-16 13:58:51 -0800 |
commit | efc9c146c3c9c2c08af88a6c26d13da9ec5be074 (patch) | |
tree | 3b721a6dabe6592da88408425ae041bcde716225 /al/event.h | |
parent | 9710a859fa13ea105071b1e4d72a335d8ec6b3be (diff) |
Move AsyncEvent to a separate header
Diffstat (limited to 'al/event.h')
-rw-r--r-- | al/event.h | 45 |
1 files changed, 0 insertions, 45 deletions
@@ -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); |