diff options
author | Chris Robinson <[email protected]> | 2020-09-05 20:48:56 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-09-05 20:48:56 -0700 |
commit | c52bf8c401aaf78bbcfa99b33fdaf4838999d547 (patch) | |
tree | 453bccbc16da43e7ec5403b57feab52e82e12faa /alc/effects/base.h | |
parent | 9975aeb37f0bcb9a35b1cba7a755abc4774883d0 (diff) |
Rework effect slot buffer setting
Rather than creating an effect-specific buffer that gets passed along as a
property, the buffer is set the effect state when the effect state is created,
the device is updated, or the buffer is changed. The buffer can only be set
while the effect slot isn't playing, so it won't be changed or updated while
the mixer is processing the effect state.
Diffstat (limited to 'alc/effects/base.h')
-rw-r--r-- | alc/effects/base.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/alc/effects/base.h b/alc/effects/base.h index a6b7e98a..db38fc49 100644 --- a/alc/effects/base.h +++ b/alc/effects/base.h @@ -155,10 +155,6 @@ const EffectVtable T##_vtable = { \ } -struct EffectBufferBase : public al::intrusive_ref<EffectBufferBase> { - virtual ~EffectBufferBase() = default; -}; - struct EffectTarget { MixParams *Main; RealMixParams *RealOut; @@ -171,13 +167,7 @@ struct EffectState : public al::intrusive_ref<EffectState> { virtual ~EffectState() = default; virtual void deviceUpdate(const ALCdevice *device) = 0; - /* Implementations are currently required to copy the buffer data if they - * wish to hold on to it, as there's no guarantee the buffer won't be - * deleted or altered during a mix. - */ - virtual EffectBufferBase *createBuffer(const ALCdevice* /*device*/, - const BufferStorage& /*buffer*/) - { return nullptr; } + virtual void setBuffer(const ALCdevice* /*device*/, const BufferStorage* /*buffer*/) { } virtual void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) = 0; virtual void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) = 0; }; |