13 using uint
= unsigned int;
16 enum class AsyncEnableBits
: std::uint8_t {
24 enum class AsyncSrcState
: std::uint8_t {
31 using AsyncKillThread
= std::monostate
;
33 struct AsyncSourceStateEvent
{
38 struct AsyncBufferCompleteEvent
{
43 struct AsyncDisconnectEvent
{
47 struct AsyncEffectReleaseEvent
{
48 EffectState
*mEffectState
;
51 using AsyncEvent
= std::variant
<AsyncKillThread
,
52 AsyncSourceStateEvent
,
53 AsyncBufferCompleteEvent
,
54 AsyncEffectReleaseEvent
,
55 AsyncDisconnectEvent
>;
57 template<typename T
, typename
...Args
>
58 auto &InitAsyncEvent(std::byte
*evtbuf
, Args
&& ...args
)
60 auto *evt
= al::construct_at(reinterpret_cast<AsyncEvent
*>(evtbuf
), std::in_place_type
<T
>,
61 std::forward
<Args
>(args
)...);
62 return std::get
<T
>(*evt
);