aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/echo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/effects/echo.cpp')
-rw-r--r--Alc/effects/echo.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/Alc/effects/echo.cpp b/Alc/effects/echo.cpp
index 492da6f6..47d21e6c 100644
--- a/Alc/effects/echo.cpp
+++ b/Alc/effects/echo.cpp
@@ -203,30 +203,20 @@ static ALvoid ALechoState_process(ALechoState *state, ALsizei SamplesToDo, const
struct EchoStateFactory final : public EffectStateFactory {
- EchoStateFactory() noexcept;
+ ALeffectState *create() override;
};
-ALeffectState *EchoStateFactory_create(EchoStateFactory *UNUSED(factory))
+ALeffectState *EchoStateFactory::create()
{
ALechoState *state;
-
NEW_OBJ0(state, ALechoState)();
- if(!state) return NULL;
-
- return STATIC_CAST(ALeffectState, state);
-}
-
-DEFINE_EFFECTSTATEFACTORY_VTABLE(EchoStateFactory);
-
-EchoStateFactory::EchoStateFactory() noexcept
- : EffectStateFactory{GET_VTABLE2(EchoStateFactory, EffectStateFactory)}
-{
+ return state;
}
EffectStateFactory *EchoStateFactory_getFactory(void)
{
static EchoStateFactory EchoFactory{};
- return STATIC_CAST(EffectStateFactory, &EchoFactory);
+ return &EchoFactory;
}