Move AsyncEvent to a separate header
This commit is contained in:
@@ -659,6 +659,7 @@ set(ALC_OBJS
|
||||
alc/alcontext.h
|
||||
alc/ambdec.cpp
|
||||
alc/ambdec.h
|
||||
alc/async_event.h
|
||||
alc/bformatdec.cpp
|
||||
alc/bformatdec.h
|
||||
alc/buffer_storage.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"
|
||||
|
||||
-45
@@ -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);
|
||||
|
||||
@@ -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"
|
||||
|
||||
+1
-1
@@ -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"
|
||||
|
||||
@@ -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
|
||||
+1
-1
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user