diff options
author | Chris Robinson <[email protected]> | 2018-11-19 22:34:26 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-19 22:34:26 -0800 |
commit | 8472a9d916eae13771455c2b527c1148aa71d8fb (patch) | |
tree | d86470a5e2882ce73a86a892eac7082bd2b97566 /Alc/alc.cpp | |
parent | 6ac84c7a5f6d267522bdc872802c8940dcd2adec (diff) |
Use proper inheritence for the effect state objects
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r-- | Alc/alc.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 6e68d130..56a581fd 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -2256,11 +2256,11 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) if(context->DefaultSlot) { ALeffectslot *slot = context->DefaultSlot; - ALeffectState *state = slot->Effect.State; + EffectState *state = slot->Effect.State; - state->OutBuffer = device->Dry.Buffer; - state->OutChannels = device->Dry.NumChannels; - if(V(state,deviceUpdate)(device) == AL_FALSE) + state->mOutBuffer = device->Dry.Buffer; + state->mOutChannels = device->Dry.NumChannels; + if(state->deviceUpdate(device) == AL_FALSE) update_failed = AL_TRUE; else UpdateEffectSlotProps(slot, context); @@ -2270,11 +2270,11 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) almtx_lock(&context->EffectSlotLock); for(auto &slot : context->EffectSlotList) { - ALeffectState *state = slot->Effect.State; + EffectState *state = slot->Effect.State; - state->OutBuffer = device->Dry.Buffer; - state->OutChannels = device->Dry.NumChannels; - if(V(state,deviceUpdate)(device) == AL_FALSE) + state->mOutBuffer = device->Dry.Buffer; + state->mOutChannels = device->Dry.NumChannels; + if(state->deviceUpdate(device) == AL_FALSE) update_failed = AL_TRUE; else UpdateEffectSlotProps(slot, context); @@ -2603,7 +2603,7 @@ ALCcontext_struct::~ALCcontext_struct() while(eprops) { struct ALeffectslotProps *next{eprops->next.load(std::memory_order_relaxed)}; - if(eprops->State) ALeffectState_DecRef(eprops->State); + if(eprops->State) eprops->State->DecRef(); al_free(eprops); eprops = next; ++count; |