From 0d3b041aa25cefb16b6ef2e5d0ad0a2f93986a92 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 21 Dec 2020 21:11:25 -0800 Subject: Avoid AL types and enums in the effect processors --- alc/effects/fshifter.cpp | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'alc/effects/fshifter.cpp') diff --git a/alc/effects/fshifter.cpp b/alc/effects/fshifter.cpp index c1acf08c..0af77fd8 100644 --- a/alc/effects/fshifter.cpp +++ b/alc/effects/fshifter.cpp @@ -26,12 +26,11 @@ #include #include -#include "al/auxeffectslot.h" #include "alcmain.h" +#include "alcomplex.h" #include "alcontext.h" #include "alu.h" - -#include "alcomplex.h" +#include "effectslot.h" namespace { @@ -62,8 +61,8 @@ alignas(16) const std::array HannWindow = InitHannWindow(); struct FshifterState final : public EffectState { /* Effect parameters */ size_t mCount{}; - ALuint mPhaseStep[2]{}; - ALuint mPhase[2]{}; + uint mPhaseStep[2]{}; + uint mPhase[2]{}; double mSign[2]{}; /* Effects buffers */ @@ -121,15 +120,13 @@ void FshifterState::update(const ALCcontext *context, const EffectSlot *slot, switch(props->Fshifter.LeftDirection) { - case AL_FREQUENCY_SHIFTER_DIRECTION_DOWN: + case FShifterDirection::Down: mSign[0] = -1.0; break; - - case AL_FREQUENCY_SHIFTER_DIRECTION_UP: + case FShifterDirection::Up: mSign[0] = 1.0; break; - - case AL_FREQUENCY_SHIFTER_DIRECTION_OFF: + case FShifterDirection::Off: mPhase[0] = 0; mPhaseStep[0] = 0; break; @@ -137,15 +134,13 @@ void FshifterState::update(const ALCcontext *context, const EffectSlot *slot, switch(props->Fshifter.RightDirection) { - case AL_FREQUENCY_SHIFTER_DIRECTION_DOWN: + case FShifterDirection::Down: mSign[1] = -1.0; break; - - case AL_FREQUENCY_SHIFTER_DIRECTION_UP: + case FShifterDirection::Up: mSign[1] = 1.0; break; - - case AL_FREQUENCY_SHIFTER_DIRECTION_OFF: + case FShifterDirection::Off: mPhase[1] = 0; mPhaseStep[1] = 0; break; @@ -199,10 +194,10 @@ void FshifterState::process(const size_t samplesToDo, const al::span::Tau())}; -- cgit v1.2.3