diff options
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.cpp')
-rw-r--r-- | OpenAL32/alAuxEffectSlot.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/OpenAL32/alAuxEffectSlot.cpp b/OpenAL32/alAuxEffectSlot.cpp index ff0f7eaa..4e25d3ee 100644 --- a/OpenAL32/alAuxEffectSlot.cpp +++ b/OpenAL32/alAuxEffectSlot.cpp @@ -487,15 +487,13 @@ ALenum InitializeEffect(ALCcontext *Context, ALeffectslot *EffectSlot, ALeffect if(newtype != EffectSlot->Effect.Type) { - EffectStateFactory *factory; - - factory = getFactoryByType(newtype); + EffectStateFactory *factory = getFactoryByType(newtype); if(!factory) { ERR("Failed to find factory for effect type 0x%04x\n", newtype); return AL_INVALID_ENUM; } - State = EffectStateFactory_create(factory); + State = factory->create(); if(!State) return AL_OUT_OF_MEMORY; START_MIXER_MODE(); @@ -663,7 +661,7 @@ static void RemoveActiveEffectSlots(const ALuint *slotids, ALsizei count, ALCcon ALenum InitEffectSlot(ALeffectslot *slot) { EffectStateFactory *factory{getFactoryByType(slot->Effect.Type)}; - slot->Effect.State = EffectStateFactory_create(factory); + slot->Effect.State = factory->create(); if(!slot->Effect.State) return AL_OUT_OF_MEMORY; ALeffectState_IncRef(slot->Effect.State); |