aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
Diffstat (limited to 'alc')
-rw-r--r--alc/alc.cpp1
-rw-r--r--alc/alu.cpp2
-rw-r--r--alc/async_event.h49
-rw-r--r--alc/voice.cpp2
4 files changed, 52 insertions, 2 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index 38696498..2720033e 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -75,6 +75,7 @@
#include "alspan.h"
#include "alstring.h"
#include "alu.h"
+#include "async_event.h"
#include "atomic.h"
#include "bformatdec.h"
#include "compat.h"
diff --git a/alc/alu.cpp b/alc/alu.cpp
index 790b8485..6ecafd09 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -44,13 +44,13 @@
#include "AL/alc.h"
#include "AL/efx.h"
-#include "al/event.h"
#include "alcmain.h"
#include "alcontext.h"
#include "almalloc.h"
#include "alnumeric.h"
#include "alspan.h"
#include "alstring.h"
+#include "async_event.h"
#include "atomic.h"
#include "bformatdec.h"
#include "core/ambidefs.h"
diff --git a/alc/async_event.h b/alc/async_event.h
new file mode 100644
index 00000000..1ee58b10
--- /dev/null
+++ b/alc/async_event.h
@@ -0,0 +1,49 @@
+#ifndef ALC_EVENT_H
+#define ALC_EVENT_H
+
+#include "almalloc.h"
+
+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()
+};
+
+#endif
diff --git a/alc/voice.cpp b/alc/voice.cpp
index 6c00a6a2..15240544 100644
--- a/alc/voice.cpp
+++ b/alc/voice.cpp
@@ -34,7 +34,6 @@
#include <new>
#include <utility>
-#include "al/event.h"
#include "alcmain.h"
#include "albyte.h"
#include "alconfig.h"
@@ -44,6 +43,7 @@
#include "alspan.h"
#include "alstring.h"
#include "alu.h"
+#include "async_event.h"
#include "buffer_storage.h"
#include "core/devformat.h"
#include "core/filters/biquad.h"