aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects/autowah.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/autowah.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/autowah.cpp')
-rw-r--r--alc/effects/autowah.cpp10
1 files changed, 5 insertions, 5 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)};