aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/chorus.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/effects/chorus.c')
-rw-r--r--Alc/effects/chorus.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/effects/chorus.c b/Alc/effects/chorus.c
index e1cbba2d..7877ff6f 100644
--- a/Alc/effects/chorus.c
+++ b/Alc/effects/chorus.c
@@ -57,7 +57,7 @@ typedef struct ALchorusState {
static ALvoid ALchorusState_Destruct(ALchorusState *state)
{
- free(state->SampleBuffer[0]);
+ al_free(state->SampleBuffer[0]);
state->SampleBuffer[0] = NULL;
state->SampleBuffer[1] = NULL;
ALeffectState_Destruct(STATIC_CAST(ALeffectState,state));
@@ -73,10 +73,10 @@ static ALboolean ALchorusState_deviceUpdate(ALchorusState *state, ALCdevice *Dev
if(maxlen != state->BufferLength)
{
- void *temp;
-
- temp = realloc(state->SampleBuffer[0], maxlen * sizeof(ALfloat) * 2);
+ void *temp = al_calloc(16, maxlen * sizeof(ALfloat) * 2);
if(!temp) return AL_FALSE;
+
+ al_free(state->SampleBuffer[0]);
state->SampleBuffer[0] = temp;
state->SampleBuffer[1] = state->SampleBuffer[0] + maxlen;