diff options
Diffstat (limited to 'alc/effects')
-rw-r--r-- | alc/effects/autowah.cpp | 10 | ||||
-rw-r--r-- | alc/effects/base.h | 5 | ||||
-rw-r--r-- | alc/effects/chorus.cpp | 10 | ||||
-rw-r--r-- | alc/effects/compressor.cpp | 8 | ||||
-rw-r--r-- | alc/effects/convolution.cpp | 12 | ||||
-rw-r--r-- | alc/effects/dedicated.cpp | 8 | ||||
-rw-r--r-- | alc/effects/distortion.cpp | 10 | ||||
-rw-r--r-- | alc/effects/echo.cpp | 10 | ||||
-rw-r--r-- | alc/effects/equalizer.cpp | 10 | ||||
-rw-r--r-- | alc/effects/fshifter.cpp | 10 | ||||
-rw-r--r-- | alc/effects/modulator.cpp | 10 | ||||
-rw-r--r-- | alc/effects/null.cpp | 8 | ||||
-rw-r--r-- | alc/effects/pshifter.cpp | 8 | ||||
-rw-r--r-- | alc/effects/reverb.cpp | 10 | ||||
-rw-r--r-- | alc/effects/vmorpher.cpp | 10 |
15 files changed, 70 insertions, 69 deletions
diff --git a/alc/effects/autowah.cpp b/alc/effects/autowah.cpp index 2577eb30..a21d2a01 100644 --- a/alc/effects/autowah.cpp +++ b/alc/effects/autowah.cpp @@ -69,8 +69,8 @@ struct AutowahState final : public EffectState { alignas(16) float mBufferOut[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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -78,7 +78,7 @@ struct AutowahState final : public EffectState { DEF_NEWDEL(AutowahState) }; -void AutowahState::deviceUpdate(const ALCdevice*, const Buffer&) +void AutowahState::deviceUpdate(const DeviceBase*, const Buffer&) { /* (Re-)initializing parameters and clear the buffers. */ @@ -104,10 +104,10 @@ void AutowahState::deviceUpdate(const ALCdevice*, const Buffer&) } } -void AutowahState::update(const ALCcontext *context, const EffectSlot *slot, +void AutowahState::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 auto frequency = static_cast<float>(device->Frequency); const float ReleaseTime{clampf(props->Autowah.ReleaseTime, 0.001f, 1.0f)}; diff --git a/alc/effects/base.h b/alc/effects/base.h index b482bae2..64621888 100644 --- a/alc/effects/base.h +++ b/alc/effects/base.h @@ -10,6 +10,7 @@ #include "atomic.h" #include "intrusive_ptr.h" +struct ContextBase; struct EffectSlot; struct BufferStorage; @@ -175,8 +176,8 @@ struct EffectState : public al::intrusive_ref<EffectState> { virtual ~EffectState() = default; - virtual void deviceUpdate(const ALCdevice *device, const Buffer &buffer) = 0; - virtual void update(const ALCcontext *context, const EffectSlot *slot, + virtual void deviceUpdate(const DeviceBase *device, const Buffer &buffer) = 0; + virtual void update(const ContextBase *context, const EffectSlot *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; diff --git a/alc/effects/chorus.cpp b/alc/effects/chorus.cpp index 365eaf33..805c57d5 100644 --- a/alc/effects/chorus.cpp +++ b/alc/effects/chorus.cpp @@ -68,8 +68,8 @@ struct ChorusState final : public EffectState { void getTriangleDelays(uint (*delays)[MAX_UPDATE_SAMPLES], const size_t todo); void getSinusoidDelays(uint (*delays)[MAX_UPDATE_SAMPLES], const size_t todo); - 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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -77,7 +77,7 @@ struct ChorusState final : public EffectState { DEF_NEWDEL(ChorusState) }; -void ChorusState::deviceUpdate(const ALCdevice *Device, const Buffer&) +void ChorusState::deviceUpdate(const DeviceBase *Device, const Buffer&) { constexpr float max_delay{maxf(AL_CHORUS_MAX_DELAY, AL_FLANGER_MAX_DELAY)}; @@ -94,7 +94,7 @@ void ChorusState::deviceUpdate(const ALCdevice *Device, const Buffer&) } } -void ChorusState::update(const ALCcontext *Context, const EffectSlot *Slot, +void ChorusState::update(const ContextBase *Context, const EffectSlot *Slot, const EffectProps *props, const EffectTarget target) { constexpr int mindelay{(MaxResamplerPadding>>1) << MixerFracBits}; @@ -102,7 +102,7 @@ void ChorusState::update(const ALCcontext *Context, const EffectSlot *Slot, /* The LFO depth is scaled to be relative to the sample delay. Clamp the * delay and depth to allow enough padding for resampling. */ - const ALCdevice *device{Context->mDevice.get()}; + const DeviceBase *device{Context->mDevice}; const auto frequency = static_cast<float>(device->Frequency); mWaveform = props->Chorus.Waveform; diff --git a/alc/effects/compressor.cpp b/alc/effects/compressor.cpp index 393bb93f..88fcf442 100644 --- a/alc/effects/compressor.cpp +++ b/alc/effects/compressor.cpp @@ -49,8 +49,8 @@ struct CompressorState final : public EffectState { float mEnvFollower{1.0f}; - 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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -58,7 +58,7 @@ struct CompressorState final : public EffectState { DEF_NEWDEL(CompressorState) }; -void CompressorState::deviceUpdate(const ALCdevice *device, const Buffer&) +void CompressorState::deviceUpdate(const DeviceBase *device, const Buffer&) { /* Number of samples to do a full attack and release (non-integer sample * counts are okay). @@ -73,7 +73,7 @@ void CompressorState::deviceUpdate(const ALCdevice *device, const Buffer&) mReleaseMult = std::pow(AMP_ENVELOPE_MIN/AMP_ENVELOPE_MAX, 1.0f/releaseCount); } -void CompressorState::update(const ALCcontext*, const EffectSlot *slot, +void CompressorState::update(const ContextBase*, const EffectSlot *slot, const EffectProps *props, const EffectTarget target) { mEnabled = props->Compressor.OnOff; diff --git a/alc/effects/convolution.cpp b/alc/effects/convolution.cpp index 5bb52656..0a1bd214 100644 --- a/alc/effects/convolution.cpp +++ b/alc/effects/convolution.cpp @@ -190,8 +190,8 @@ struct ConvolutionState final : public EffectState { void (ConvolutionState::*mMix)(const al::span<FloatBufferLine>,const size_t) {&ConvolutionState::NormalMix}; - 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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -219,7 +219,7 @@ void ConvolutionState::UpsampleMix(const al::span<FloatBufferLine> samplesOut, } -void ConvolutionState::deviceUpdate(const ALCdevice *device, const Buffer &buffer) +void ConvolutionState::deviceUpdate(const DeviceBase *device, const Buffer &buffer) { constexpr uint MaxConvolveAmbiOrder{1u}; @@ -316,7 +316,7 @@ void ConvolutionState::deviceUpdate(const ALCdevice *device, const Buffer &buffe } -void ConvolutionState::update(const ALCcontext *context, const EffectSlot *slot, +void ConvolutionState::update(const ContextBase *context, const EffectSlot *slot, const EffectProps* /*props*/, const EffectTarget target) { /* NOTE: Stereo and Rear are slightly different from normal mixing (as @@ -394,7 +394,7 @@ void ConvolutionState::update(const ALCcontext *context, const EffectSlot *slot, } else if(mChannels == FmtBFormat3D || mChannels == FmtBFormat2D) { - ALCdevice *device{context->mDevice.get()}; + DeviceBase *device{context->mDevice}; if(device->mAmbiOrder > mAmbiOrder) { mMix = &ConvolutionState::UpsampleMix; @@ -421,7 +421,7 @@ void ConvolutionState::update(const ALCcontext *context, const EffectSlot *slot, } else { - ALCdevice *device{context->mDevice.get()}; + DeviceBase *device{context->mDevice}; al::span<const ChanMap> chanmap{}; switch(mChannels) { diff --git a/alc/effects/dedicated.cpp b/alc/effects/dedicated.cpp index 9fee7fd7..f29458d2 100644 --- a/alc/effects/dedicated.cpp +++ b/alc/effects/dedicated.cpp @@ -37,8 +37,8 @@ struct DedicatedState final : public EffectState { float mTargetGains[MAX_OUTPUT_CHANNELS]; - 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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -46,12 +46,12 @@ struct DedicatedState final : public EffectState { DEF_NEWDEL(DedicatedState) }; -void DedicatedState::deviceUpdate(const ALCdevice*, const Buffer&) +void DedicatedState::deviceUpdate(const DeviceBase*, const Buffer&) { std::fill(std::begin(mCurrentGains), std::end(mCurrentGains), 0.0f); } -void DedicatedState::update(const ALCcontext*, const EffectSlot *slot, +void DedicatedState::update(const ContextBase*, const EffectSlot *slot, const EffectProps *props, const EffectTarget target) { std::fill(std::begin(mTargetGains), std::end(mTargetGains), 0.0f); 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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> 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<float>::Pi()*0.5f * props->Distortion.Edge), diff --git a/alc/effects/echo.cpp b/alc/effects/echo.cpp index f782055f..38183460 100644 --- a/alc/effects/echo.cpp +++ b/alc/effects/echo.cpp @@ -57,8 +57,8 @@ struct EchoState final : public EffectState { alignas(16) float mTempBuffer[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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -66,7 +66,7 @@ struct EchoState final : public EffectState { DEF_NEWDEL(EchoState) }; -void EchoState::deviceUpdate(const ALCdevice *Device, const Buffer&) +void EchoState::deviceUpdate(const DeviceBase *Device, const Buffer&) { const auto frequency = static_cast<float>(Device->Frequency); @@ -85,10 +85,10 @@ void EchoState::deviceUpdate(const ALCdevice *Device, const Buffer&) } } -void EchoState::update(const ALCcontext *context, const EffectSlot *slot, +void EchoState::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 auto frequency = static_cast<float>(device->Frequency); mTap[0].delay = maxu(float2uint(props->Echo.Delay*frequency + 0.5f), 1); diff --git a/alc/effects/equalizer.cpp b/alc/effects/equalizer.cpp index bd19c051..fd8bf8c7 100644 --- a/alc/effects/equalizer.cpp +++ b/alc/effects/equalizer.cpp @@ -90,8 +90,8 @@ struct EqualizerState final : public EffectState { FloatBufferLine mSampleBuffer{}; - 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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -99,7 +99,7 @@ struct EqualizerState final : public EffectState { DEF_NEWDEL(EqualizerState) }; -void EqualizerState::deviceUpdate(const ALCdevice*, const Buffer&) +void EqualizerState::deviceUpdate(const DeviceBase*, const Buffer&) { for(auto &e : mChans) { @@ -108,10 +108,10 @@ void EqualizerState::deviceUpdate(const ALCdevice*, const Buffer&) } } -void EqualizerState::update(const ALCcontext *context, const EffectSlot *slot, +void EqualizerState::update(const ContextBase *context, const EffectSlot *slot, const EffectProps *props, const EffectTarget target) { - const ALCdevice *device{context->mDevice.get()}; + const DeviceBase *device{context->mDevice}; auto frequency = static_cast<float>(device->Frequency); float gain, f0norm; diff --git a/alc/effects/fshifter.cpp b/alc/effects/fshifter.cpp index 4037f46b..e378a267 100644 --- a/alc/effects/fshifter.cpp +++ b/alc/effects/fshifter.cpp @@ -84,8 +84,8 @@ struct FshifterState final : public EffectState { } mGains[2]; - 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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -93,7 +93,7 @@ struct FshifterState final : public EffectState { DEF_NEWDEL(FshifterState) }; -void FshifterState::deviceUpdate(const ALCdevice*, const Buffer&) +void FshifterState::deviceUpdate(const DeviceBase*, const Buffer&) { /* (Re-)initializing parameters and clear the buffers. */ mCount = 0; @@ -114,10 +114,10 @@ void FshifterState::deviceUpdate(const ALCdevice*, const Buffer&) } } -void FshifterState::update(const ALCcontext *context, const EffectSlot *slot, +void FshifterState::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 step{props->Fshifter.Frequency / static_cast<float>(device->Frequency)}; mPhaseStep[0] = mPhaseStep[1] = fastf2u(minf(step, 1.0f) * MixerFracOne); diff --git a/alc/effects/modulator.cpp b/alc/effects/modulator.cpp index 267c73e7..380d9809 100644 --- a/alc/effects/modulator.cpp +++ b/alc/effects/modulator.cpp @@ -81,8 +81,8 @@ struct ModulatorState final : public EffectState { } mChans[MaxAmbiChannels]; - 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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -90,7 +90,7 @@ struct ModulatorState final : public EffectState { DEF_NEWDEL(ModulatorState) }; -void ModulatorState::deviceUpdate(const ALCdevice*, const Buffer&) +void ModulatorState::deviceUpdate(const DeviceBase*, const Buffer&) { for(auto &e : mChans) { @@ -99,10 +99,10 @@ void ModulatorState::deviceUpdate(const ALCdevice*, const Buffer&) } } -void ModulatorState::update(const ALCcontext *context, const EffectSlot *slot, +void ModulatorState::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 step{props->Modulator.Frequency / static_cast<float>(device->Frequency)}; mStep = fastf2u(clampf(step*WAVEFORM_FRACONE, 0.0f, float{WAVEFORM_FRACONE-1})); diff --git a/alc/effects/null.cpp b/alc/effects/null.cpp index 9d589285..f838a367 100644 --- a/alc/effects/null.cpp +++ b/alc/effects/null.cpp @@ -15,8 +15,8 @@ struct NullState final : public EffectState { NullState(); ~NullState() override; - 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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -39,14 +39,14 @@ NullState::~NullState() = default; * format) have been changed. Will always be followed by a call to the update * method, if successful. */ -void NullState::deviceUpdate(const ALCdevice* /*device*/, const Buffer& /*buffer*/) +void NullState::deviceUpdate(const DeviceBase* /*device*/, const Buffer& /*buffer*/) { } /* This updates the effect state with new properties. This is called any time * the effect is (re)loaded into a slot. */ -void NullState::update(const ALCcontext* /*context*/, const EffectSlot* /*slot*/, +void NullState::update(const ContextBase* /*context*/, const EffectSlot* /*slot*/, const EffectProps* /*props*/, const EffectTarget /*target*/) { } diff --git a/alc/effects/pshifter.cpp b/alc/effects/pshifter.cpp index 5087860f..1cf4861f 100644 --- a/alc/effects/pshifter.cpp +++ b/alc/effects/pshifter.cpp @@ -93,8 +93,8 @@ struct PshifterState final : public EffectState { float mTargetGains[MAX_OUTPUT_CHANNELS]; - 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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -102,7 +102,7 @@ struct PshifterState final : public EffectState { DEF_NEWDEL(PshifterState) }; -void PshifterState::deviceUpdate(const ALCdevice*, const Buffer&) +void PshifterState::deviceUpdate(const DeviceBase*, const Buffer&) { /* (Re-)initializing parameters and clear the buffers. */ mCount = 0; @@ -122,7 +122,7 @@ void PshifterState::deviceUpdate(const ALCdevice*, const Buffer&) std::fill(std::begin(mTargetGains), std::end(mTargetGains), 0.0f); } -void PshifterState::update(const ALCcontext*, const EffectSlot *slot, +void PshifterState::update(const ContextBase*, const EffectSlot *slot, const EffectProps *props, const EffectTarget target) { const int tune{props->Pshifter.CoarseTune*100 + props->Pshifter.FineTune}; diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp index a519fc34..1260748c 100644 --- a/alc/effects/reverb.cpp +++ b/alc/effects/reverb.cpp @@ -527,8 +527,8 @@ struct ReverbState final : public EffectState { void lateFaded(const size_t offset, const size_t todo, const float fade, const float fadeStep); - 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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -607,7 +607,7 @@ void ReverbState::allocLines(const float frequency) mLate.Delay.realizeLineOffset(mSampleBuffer.data()); } -void ReverbState::deviceUpdate(const ALCdevice *device, const Buffer&) +void ReverbState::deviceUpdate(const DeviceBase *device, const Buffer&) { const auto frequency = static_cast<float>(device->Frequency); @@ -985,10 +985,10 @@ void ReverbState::update3DPanning(const float *ReflectionsPan, const float *Late } } -void ReverbState::update(const ALCcontext *Context, const EffectSlot *Slot, +void ReverbState::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 auto frequency = static_cast<float>(Device->Frequency); /* Calculate the master filters */ 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<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -202,7 +202,7 @@ std::array<FormantFilter,4> 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<float>(device->Frequency)}; const float step{props->Vmorpher.Rate / frequency}; mStep = fastf2u(clampf(step*WAVEFORM_FRACONE, 0.0f, float{WAVEFORM_FRACONE-1})); |