diff options
author | Chris Robinson <[email protected]> | 2012-09-26 18:00:38 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-09-26 18:00:38 -0700 |
commit | d3891af36e5ee17ad728070372b1636341ae0d1b (patch) | |
tree | d236a60658efc1115c5bd939e6ce407e24a8ef98 /OpenAL32 | |
parent | ed82194260ad8e5b0f65b503b775d488edc58a94 (diff) |
Ensure effect slots are aligned
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/alAuxEffectSlot.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c index 4cfef68b..a36e0f40 100644 --- a/OpenAL32/alAuxEffectSlot.c +++ b/OpenAL32/alAuxEffectSlot.c @@ -51,11 +51,11 @@ AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslo CHECK_VALUE(Context, n >= 0); for(cur = 0;cur < n;cur++) { - ALeffectslot *slot = calloc(1, sizeof(ALeffectslot)); + ALeffectslot *slot = al_calloc(16, sizeof(ALeffectslot)); err = AL_OUT_OF_MEMORY; if(!slot || (err=InitEffectSlot(slot)) != AL_NO_ERROR) { - free(slot); + al_free(slot); al_throwerr(Context, err); break; } @@ -67,7 +67,7 @@ AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslo { FreeThunkEntry(slot->id); ALeffectState_Destroy(slot->EffectState); - free(slot); + al_free(slot); al_throwerr(Context, err); } @@ -119,7 +119,7 @@ AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, const ALuint * ALeffectState_Destroy(slot->EffectState); memset(slot, 0, sizeof(*slot)); - free(slot); + al_free(slot); } } al_endtry; @@ -604,6 +604,6 @@ ALvoid ReleaseALAuxiliaryEffectSlots(ALCcontext *Context) FreeThunkEntry(temp->id); memset(temp, 0, sizeof(ALeffectslot)); - free(temp); + al_free(temp); } } |