diff options
author | Chris Robinson <[email protected]> | 2020-11-07 08:36:49 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-11-07 08:36:49 -0800 |
commit | 4e760bbecc6ac4031dca45b4882c6faa71842e90 (patch) | |
tree | e639b40d42ef8f2c3511e93a965cddb31245a729 /alc/alc.cpp | |
parent | 120776bec5f908104f0e76453402ff45a0762846 (diff) |
Use a separate structure for the active effect slot properties
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r-- | alc/alc.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp index c94a9d53..08bb4c2f 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -2122,7 +2122,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList) slot->updateProps(context); } - if(ALeffectslotArray *curarray{context->mActiveAuxSlots.load(std::memory_order_relaxed)}) + if(EffectSlotArray *curarray{context->mActiveAuxSlots.load(std::memory_order_relaxed)}) std::fill_n(curarray->end(), curarray->size(), nullptr); for(auto &sublist : context->mEffectSlotList) { @@ -2366,17 +2366,17 @@ ALCcontext::~ALCcontext() mNumSources = 0; count = 0; - ALeffectslotProps *eprops{mFreeEffectslotProps.exchange(nullptr, std::memory_order_acquire)}; + EffectSlotProps *eprops{mFreeEffectslotProps.exchange(nullptr, std::memory_order_acquire)}; while(eprops) { - ALeffectslotProps *next{eprops->next.load(std::memory_order_relaxed)}; + EffectSlotProps *next{eprops->next.load(std::memory_order_relaxed)}; delete eprops; eprops = next; ++count; } TRACE("Freed %zu AuxiliaryEffectSlot property object%s\n", count, (count==1)?"":"s"); - if(ALeffectslotArray *curarray{mActiveAuxSlots.exchange(nullptr, std::memory_order_relaxed)}) + if(EffectSlotArray *curarray{mActiveAuxSlots.exchange(nullptr, std::memory_order_relaxed)}) { al::destroy_n(curarray->end(), curarray->size()); delete curarray; @@ -2455,13 +2455,13 @@ void ALCcontext::init() } } - ALeffectslotArray *auxslots; + EffectSlotArray *auxslots; if(!mDefaultSlot) - auxslots = ALeffectslot::CreatePtrArray(0); + auxslots = EffectSlot::CreatePtrArray(0); else { - auxslots = ALeffectslot::CreatePtrArray(1); - (*auxslots)[0] = mDefaultSlot.get(); + auxslots = EffectSlot::CreatePtrArray(1); + (*auxslots)[0] = &mDefaultSlot->mSlot; mDefaultSlot->mState = SlotState::Playing; } mActiveAuxSlots.store(auxslots, std::memory_order_relaxed); |