From 7851f7d4ceff78f2722a4a2e3957c75dec26da1d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 5 Sep 2020 18:12:46 -0700 Subject: Don't add effect slots to the active list until an effect is set --- al/auxeffectslot.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'al/auxeffectslot.h') diff --git a/al/auxeffectslot.h b/al/auxeffectslot.h index 79373f45..3977b650 100644 --- a/al/auxeffectslot.h +++ b/al/auxeffectslot.h @@ -40,6 +40,12 @@ struct ALeffectslotProps { }; +enum class SlotState : ALenum { + Initial = AL_INITIAL, + Playing = AL_PLAYING, + Stopped = AL_STOPPED, +}; + struct ALeffectslot { float Gain{1.0f}; bool AuxSendAuto{true}; @@ -56,6 +62,8 @@ struct ALeffectslot { std::atomic_flag PropsClean; + SlotState mState{SlotState::Initial}; + RefCount ref{0u}; struct { -- cgit v1.2.3