Support loading as float or ADPCM in alplay
[openal-soft.git] / core / async_event.h
blob5a2f5f91acb0c071719d2cabfd22967406d5a844
1 #ifndef CORE_EVENT_H
2 #define CORE_EVENT_H
4 #include "almalloc.h"
6 struct EffectState;
8 using uint = unsigned int;
11 struct AsyncEvent {
12 enum : uint {
13 /* User event types. */
14 SourceStateChange,
15 BufferCompleted,
16 Disconnected,
17 UserEventCount,
19 /* Internal events, always processed. */
20 ReleaseEffectState = 128,
22 /* End event thread processing. */
23 KillThread,
26 enum class SrcState {
27 Reset,
28 Stop,
29 Play,
30 Pause
33 const uint EnumType;
34 union {
35 char dummy;
36 struct {
37 uint id;
38 SrcState state;
39 } srcstate;
40 struct {
41 uint id;
42 uint count;
43 } bufcomp;
44 struct {
45 char msg[244];
46 } disconnect;
47 EffectState *mEffectState;
48 } u{};
50 constexpr AsyncEvent(uint type) noexcept : EnumType{type} { }
52 DISABLE_ALLOC()
55 #endif