aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects/distortion.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-11-07 08:36:49 -0800
committerChris Robinson <[email protected]>2020-11-07 08:36:49 -0800
commit4e760bbecc6ac4031dca45b4882c6faa71842e90 (patch)
treee639b40d42ef8f2c3511e93a965cddb31245a729 /alc/effects/distortion.cpp
parent120776bec5f908104f0e76453402ff45a0762846 (diff)
Use a separate structure for the active effect slot properties
Diffstat (limited to 'alc/effects/distortion.cpp')
-rw-r--r--alc/effects/distortion.cpp11
1 files changed, 7 insertions, 4 deletions
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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> 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<const FloatBufferLine> samplesIn,
+ const al::span<FloatBufferLine> 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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut)