From b54bb388a3dbd92518beef4bda03df5854aad1a9 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 24 Apr 2021 08:28:13 -0700 Subject: Create a base the ALCdevice and ALCcontext structs A base that contains the API-agnostic data, with ALCdevice and ALCcontext being for AL-specific data. --- alc/effects/distortion.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'alc/effects/distortion.cpp') diff --git a/alc/effects/distortion.cpp b/alc/effects/distortion.cpp index 09dae4c5..a9ac8293 100644 --- a/alc/effects/distortion.cpp +++ b/alc/effects/distortion.cpp @@ -45,8 +45,8 @@ struct DistortionState final : public EffectState { float mBuffer[2][BufferLineSize]{}; - void deviceUpdate(const ALCdevice *device, const Buffer &buffer) override; - void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props, + void deviceUpdate(const DeviceBase *device, const Buffer &buffer) override; + void update(const ContextBase *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; @@ -54,16 +54,16 @@ struct DistortionState final : public EffectState { DEF_NEWDEL(DistortionState) }; -void DistortionState::deviceUpdate(const ALCdevice*, const Buffer&) +void DistortionState::deviceUpdate(const DeviceBase*, const Buffer&) { mLowpass.clear(); mBandpass.clear(); } -void DistortionState::update(const ALCcontext *context, const EffectSlot *slot, +void DistortionState::update(const ContextBase *context, const EffectSlot *slot, const EffectProps *props, const EffectTarget target) { - const ALCdevice *device{context->mDevice.get()}; + const DeviceBase *device{context->mDevice}; /* Store waveshaper edge settings. */ const float edge{minf(std::sin(al::MathDefs::Pi()*0.5f * props->Distortion.Edge), -- cgit v1.2.3