diff options
author | Chris Robinson <[email protected]> | 2013-05-21 13:27:27 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-05-21 13:27:27 -0700 |
commit | 604726c6392e6deefa9648ef6f8044ccf85ac1fa (patch) | |
tree | d569ca72b3883be9ef6d8be5ff11ea232d7b085d /OpenAL32/alAuxEffectSlot.c | |
parent | eaccaa50284da45401d841a867a7a10daa00dbd0 (diff) |
Add a DELETE macro to help destroy objects
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.c')
-rw-r--r-- | OpenAL32/alAuxEffectSlot.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c index 4003d440..42f6c103 100644 --- a/OpenAL32/alAuxEffectSlot.c +++ b/OpenAL32/alAuxEffectSlot.c @@ -74,8 +74,7 @@ AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslo if(err != AL_NO_ERROR) { FreeThunkEntry(slot->id); - ALeffectStateFactory_destroy(ALeffectState_getCreator(slot->EffectState), - slot->EffectState); + DELETE(slot->EffectState); al_free(slot); alDeleteAuxiliaryEffectSlots(cur, effectslots); @@ -124,8 +123,7 @@ AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, const ALuint * FreeThunkEntry(slot->id); RemoveEffectSlotArray(Context, slot); - ALeffectStateFactory_destroy(ALeffectState_getCreator(slot->EffectState), - slot->EffectState); + DELETE(slot->EffectState); memset(slot, 0, sizeof(*slot)); al_free(slot); @@ -598,7 +596,7 @@ ALenum InitializeEffect(ALCdevice *Device, ALeffectslot *EffectSlot, ALeffect *e { ALCdevice_Unlock(Device); RestoreFPUMode(&oldMode); - ALeffectStateFactory_destroy(ALeffectState_getCreator(State), State); + DELETE(State); return AL_OUT_OF_MEMORY; } @@ -617,7 +615,7 @@ ALenum InitializeEffect(ALCdevice *Device, ALeffectslot *EffectSlot, ALeffect *e RestoreFPUMode(&oldMode); - ALeffectStateFactory_destroy(ALeffectState_getCreator(State), State); + DELETE(State); State = NULL; } else @@ -667,8 +665,7 @@ ALvoid ReleaseALAuxiliaryEffectSlots(ALCcontext *Context) ALeffectslot *temp = Context->EffectSlotMap.array[pos].value; Context->EffectSlotMap.array[pos].value = NULL; - ALeffectStateFactory_destroy(ALeffectState_getCreator(temp->EffectState), - temp->EffectState); + DELETE(temp->EffectState); FreeThunkEntry(temp->id); memset(temp, 0, sizeof(ALeffectslot)); |