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/vmorpher.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'alc/effects/vmorpher.cpp') diff --git a/alc/effects/vmorpher.cpp b/alc/effects/vmorpher.cpp index ab21439c..332df159 100644 --- a/alc/effects/vmorpher.cpp +++ b/alc/effects/vmorpher.cpp @@ -138,8 +138,8 @@ struct VmorpherState final : public EffectState { alignas(16) float mSampleBufferB[MAX_UPDATE_SAMPLES]{}; alignas(16) float mLfo[MAX_UPDATE_SAMPLES]{}; - 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; @@ -202,7 +202,7 @@ std::array VmorpherState::getFiltersByPhoneme(VMorpherPhenome p } -void VmorpherState::deviceUpdate(const ALCdevice*, const Buffer&) +void VmorpherState::deviceUpdate(const DeviceBase*, const Buffer&) { for(auto &e : mChans) { @@ -214,10 +214,10 @@ void VmorpherState::deviceUpdate(const ALCdevice*, const Buffer&) } } -void VmorpherState::update(const ALCcontext *context, const EffectSlot *slot, +void VmorpherState::update(const ContextBase *context, const EffectSlot *slot, const EffectProps *props, const EffectTarget target) { - const ALCdevice *device{context->mDevice.get()}; + const DeviceBase *device{context->mDevice}; const float frequency{static_cast(device->Frequency)}; const float step{props->Vmorpher.Rate / frequency}; mStep = fastf2u(clampf(step*WAVEFORM_FRACONE, 0.0f, float{WAVEFORM_FRACONE-1})); -- cgit v1.2.3