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.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'al/auxeffectslot.cpp') diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp index 1f35b344..5f71ea97 100644 --- a/al/auxeffectslot.cpp +++ b/al/auxeffectslot.cpp @@ -310,8 +310,6 @@ START_API_FUNC } while(--count); std::copy(ids.cbegin(), ids.cend(), effectslots); } - - AddActiveEffectSlots(effectslots, static_cast(n), context.get()); } END_API_FUNC @@ -404,6 +402,11 @@ START_API_FUNC context->setError(err, "Effect initialization failed"); return; } + if(slot->mState == SlotState::Initial) + { + AddActiveEffectSlots(&slot->id, 1, context.get()); + slot->mState = SlotState::Playing; + } break; case AL_EFFECTSLOT_AUXILIARY_SEND_AUTO: -- cgit v1.2.3