From 4e760bbecc6ac4031dca45b4882c6faa71842e90 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 7 Nov 2020 08:36:49 -0800 Subject: Use a separate structure for the active effect slot properties --- alc/effects/distortion.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'alc/effects/distortion.cpp') diff --git a/alc/effects/distortion.cpp b/alc/effects/distortion.cpp index be787b78..a199952f 100644 --- a/alc/effects/distortion.cpp +++ b/alc/effects/distortion.cpp @@ -47,8 +47,10 @@ struct DistortionState final : public EffectState { void deviceUpdate(const ALCdevice *device) override; - void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; - void process(const size_t samplesToDo, const al::span samplesIn, const al::span samplesOut) override; + void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props, + const EffectTarget target) override; + void process(const size_t samplesToDo, const al::span samplesIn, + const al::span samplesOut) override; DEF_NEWDEL(DistortionState) }; @@ -59,7 +61,8 @@ void DistortionState::deviceUpdate(const ALCdevice*) mBandpass.clear(); } -void DistortionState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) +void DistortionState::update(const ALCcontext *context, const EffectSlot *slot, + const EffectProps *props, const EffectTarget target) { const ALCdevice *device{context->mDevice.get()}; @@ -85,7 +88,7 @@ void DistortionState::update(const ALCcontext *context, const ALeffectslot *slot const auto coeffs = CalcDirectionCoeffs({0.0f, 0.0f, -1.0f}, 0.0f); mOutTarget = target.Main->Buffer; - ComputePanGains(target.Main, coeffs.data(), slot->Params.Gain*props->Distortion.Gain, mGain); + ComputePanGains(target.Main, coeffs.data(), slot->Gain*props->Distortion.Gain, mGain); } void DistortionState::process(const size_t samplesToDo, const al::span samplesIn, const al::span samplesOut) -- cgit v1.2.3