aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects/autowah.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-11-07 08:36:49 -0800
committerChris Robinson <[email protected]>2020-11-07 08:36:49 -0800
commit4e760bbecc6ac4031dca45b4882c6faa71842e90 (patch)
treee639b40d42ef8f2c3511e93a965cddb31245a729 /alc/effects/autowah.cpp
parent120776bec5f908104f0e76453402ff45a0762846 (diff)
Use a separate structure for the active effect slot properties
Diffstat (limited to 'alc/effects/autowah.cpp')
-rw-r--r--alc/effects/autowah.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/alc/effects/autowah.cpp b/alc/effects/autowah.cpp
index 3ebb1544..423d1b54 100644
--- a/alc/effects/autowah.cpp
+++ b/alc/effects/autowah.cpp
@@ -70,8 +70,10 @@ struct AutowahState final : public EffectState {
void deviceUpdate(const ALCdevice *device) override;
- void update(const ALCcontext *context, const ALeffectslot *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;
+ void update(const ALCcontext *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;
DEF_NEWDEL(AutowahState)
};
@@ -102,7 +104,8 @@ void AutowahState::deviceUpdate(const ALCdevice*)
}
}
-void AutowahState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target)
+void AutowahState::update(const ALCcontext *context, const EffectSlot *slot,
+ const EffectProps *props, const EffectTarget target)
{
const ALCdevice *device{context->mDevice.get()};
const auto frequency = static_cast<float>(device->Frequency);
@@ -119,11 +122,12 @@ void AutowahState::update(const ALCcontext *context, const ALeffectslot *slot, c
mOutTarget = target.Main->Buffer;
auto set_gains = [slot,target](auto &chan, al::span<const float,MAX_AMBI_CHANNELS> coeffs)
- { ComputePanGains(target.Main, coeffs.data(), slot->Params.Gain, chan.TargetGains); };
+ { ComputePanGains(target.Main, coeffs.data(), slot->Gain, chan.TargetGains); };
SetAmbiPanIdentity(std::begin(mChans), slot->Wet.Buffer.size(), set_gains);
}
-void AutowahState::process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut)
+void AutowahState::process(const size_t samplesToDo,
+ const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut)
{
const float attack_rate{mAttackRate};
const float release_rate{mReleaseRate};