diff options
author | Chris Robinson <[email protected]> | 2021-01-24 02:07:39 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-01-24 02:07:39 -0800 |
commit | 13c1d7efb7141aee93d32a60c0e609e61a64f550 (patch) | |
tree | c788c53507811f8adb8a33ee668c014f66d9b8fa /al/auxeffectslot.cpp | |
parent | 3142fb30eaa451c955a1607b8cffe2069cbd15b2 (diff) |
Store buffer info in the queue entry
Diffstat (limited to 'al/auxeffectslot.cpp')
-rw-r--r-- | al/auxeffectslot.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp index 8b31ab80..10f13be7 100644 --- a/al/auxeffectslot.cpp +++ b/al/auxeffectslot.cpp @@ -126,6 +126,13 @@ inline ALbuffer *LookupBuffer(ALCdevice *device, ALuint id) noexcept } +inline auto GetEffectBuffer(ALbuffer *buffer) noexcept -> EffectState::Buffer +{ + if(!buffer) return EffectState::Buffer{}; + return EffectState::Buffer{buffer, buffer->mData}; +} + + void AddActiveEffectSlots(const al::span<ALeffectslot*> auxslots, ALCcontext *context) { if(auxslots.empty()) return; @@ -650,7 +657,7 @@ START_API_FUNC FPUCtl mixer_mode{}; auto *state = slot->Effect.State.get(); - state->deviceUpdate(device, buffer); + state->deviceUpdate(device, GetEffectBuffer(buffer)); } break; @@ -926,7 +933,7 @@ ALenum ALeffectslot::initEffect(ALeffect *effect, ALCcontext *context) state->mOutTarget = device->Dry.Buffer; { FPUCtl mixer_mode{}; - state->deviceUpdate(device, Buffer); + state->deviceUpdate(device, GetEffectBuffer(Buffer)); } Effect.Type = newtype; |