aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/autowah.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/effects/autowah.cpp')
-rw-r--r--Alc/effects/autowah.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/Alc/effects/autowah.cpp b/Alc/effects/autowah.cpp
index a8e4fe6e..eb2696fe 100644
--- a/Alc/effects/autowah.cpp
+++ b/Alc/effects/autowah.cpp
@@ -207,33 +207,23 @@ static ALvoid ALautowahState_process(ALautowahState *state, ALsizei SamplesToDo,
}
struct AutowahStateFactory final : public EffectStateFactory {
- AutowahStateFactory() noexcept;
+ ALeffectState *create() override;
};
-static ALeffectState *AutowahStateFactory_create(AutowahStateFactory *UNUSED(factory))
+ALeffectState *AutowahStateFactory::create()
{
ALautowahState *state;
-
NEW_OBJ0(state, ALautowahState)();
- if(!state) return NULL;
-
- return STATIC_CAST(ALeffectState, state);
-}
-
-DEFINE_EFFECTSTATEFACTORY_VTABLE(AutowahStateFactory);
-
-AutowahStateFactory::AutowahStateFactory() noexcept
- : EffectStateFactory{GET_VTABLE2(AutowahStateFactory, EffectStateFactory)}
-{
+ return state;
}
EffectStateFactory *AutowahStateFactory_getFactory(void)
{
static AutowahStateFactory AutowahFactory{};
-
- return STATIC_CAST(EffectStateFactory, &AutowahFactory);
+ return &AutowahFactory;
}
+
void ALautowah_setParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
{
ALeffectProps *props = &effect->Props;