aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/fshifter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/effects/fshifter.cpp')
-rw-r--r--Alc/effects/fshifter.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/Alc/effects/fshifter.cpp b/Alc/effects/fshifter.cpp
index f112c4c7..7775fafb 100644
--- a/Alc/effects/fshifter.cpp
+++ b/Alc/effects/fshifter.cpp
@@ -218,32 +218,23 @@ ALvoid ALfshifterState_process(ALfshifterState *state, ALsizei SamplesToDo, cons
} // namespace
struct FshifterStateFactory final : public EffectStateFactory {
- FshifterStateFactory() noexcept;
+ ALeffectState *create() override;
};
-static ALeffectState *FshifterStateFactory_create(FshifterStateFactory *UNUSED(factory))
+ALeffectState *FshifterStateFactory::create()
{
ALfshifterState *state;
-
NEW_OBJ0(state, ALfshifterState)();
- if(!state) return NULL;
-
- return STATIC_CAST(ALeffectState, state);
-}
-
-DEFINE_EFFECTSTATEFACTORY_VTABLE(FshifterStateFactory);
-
-FshifterStateFactory::FshifterStateFactory() noexcept
- : EffectStateFactory{GET_VTABLE2(FshifterStateFactory, EffectStateFactory)}
-{
+ return state;
}
EffectStateFactory *FshifterStateFactory_getFactory(void)
{
static FshifterStateFactory FshifterFactory{};
- return STATIC_CAST(EffectStateFactory, &FshifterFactory);
+ return &FshifterFactory;
}
+
void ALfshifter_setParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
{
ALeffectProps *props = &effect->Props;