Silence an MSVC warning
[openal-soft.git] / al / event.h
blob9056d57753d717ac22da3be52c65eb11ae71d0ba
1 #ifndef AL_EVENT_H
2 #define AL_EVENT_H
4 #include "AL/al.h"
5 #include "AL/alc.h"
7 struct EffectState;
10 enum {
11 /* End event thread processing. */
12 EventType_KillThread = 0,
14 /* User event types. */
15 EventType_SourceStateChange = 1<<0,
16 EventType_BufferCompleted = 1<<1,
17 EventType_Error = 1<<2,
18 EventType_Performance = 1<<3,
19 EventType_Deprecated = 1<<4,
20 EventType_Disconnected = 1<<5,
22 /* Internal events. */
23 EventType_ReleaseEffectState = 65536,
26 struct AsyncEvent {
27 unsigned int EnumType{0u};
28 union {
29 char dummy;
30 struct {
31 ALuint id;
32 ALenum state;
33 } srcstate;
34 struct {
35 ALuint id;
36 ALuint count;
37 } bufcomp;
38 struct {
39 ALenum type;
40 ALuint id;
41 ALuint param;
42 ALchar msg[232];
43 } user;
44 EffectState *mEffectState;
45 } u{};
47 AsyncEvent() noexcept = default;
48 constexpr AsyncEvent(unsigned int type) noexcept : EnumType{type} { }
52 void StartEventThrd(ALCcontext *ctx);
53 void StopEventThrd(ALCcontext *ctx);
55 #endif