diff options
author | Chris Robinson <[email protected]> | 2023-04-04 10:15:54 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-04-04 10:15:54 -0700 |
commit | 9062721fa84322d794e9676974ad1a3e82913b91 (patch) | |
tree | fcaa5a57eca644c66ee6802a19e0614be8d12c0e /alc/alc.cpp | |
parent | 2c82778f93a2104632702b04bf6f1c6a15c53612 (diff) |
Simplify effect state buffer handling some
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r-- | alc/alc.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp index eb3873f2..af8ff55d 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -2318,11 +2318,6 @@ ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList) { auto *context = static_cast<ALCcontext*>(ctxbase); - auto GetEffectBuffer = [](ALbuffer *buffer) noexcept -> EffectState::Buffer - { - if(!buffer) return EffectState::Buffer{}; - return EffectState::Buffer{buffer, buffer->mData}; - }; std::unique_lock<std::mutex> proplock{context->mPropLock}; std::unique_lock<std::mutex> slotlock{context->mEffectSlotLock}; @@ -2359,7 +2354,7 @@ ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList) EffectState *state{slot->Effect.State.get()}; state->mOutTarget = device->Dry.Buffer; - state->deviceUpdate(device, GetEffectBuffer(slot->Buffer)); + state->deviceUpdate(device, slot->Buffer); slot->updateProps(context); } @@ -2378,7 +2373,7 @@ ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList) EffectState *state{slot->Effect.State.get()}; state->mOutTarget = device->Dry.Buffer; - state->deviceUpdate(device, GetEffectBuffer(slot->Buffer)); + state->deviceUpdate(device, slot->Buffer); slot->updateProps(context); } } |