aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects/chorus.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-04-24 08:28:13 -0700
committerChris Robinson <[email protected]>2021-04-24 08:28:13 -0700
commitb54bb388a3dbd92518beef4bda03df5854aad1a9 (patch)
tree8cde0be5ca02b61ae81bf0c3ccdd3a2439b1923a /alc/effects/chorus.cpp
parent519672c8e54585bc6d827dd3efed943e06b3e6cd (diff)
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.
Diffstat (limited to 'alc/effects/chorus.cpp')
-rw-r--r--alc/effects/chorus.cpp10
1 files changed, 5 insertions, 5 deletions
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;