diff options
author | Chris Robinson <[email protected]> | 2009-10-21 02:03:33 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-10-21 02:03:33 -0700 |
commit | d3ecbd75affa0c42290c24a1cd82019e89ea3461 (patch) | |
tree | 9f271a712fc98f518e2de1139f5065c67b17d569 /Alc/alcReverb.c | |
parent | 75b65ab2a29aa10a054974f443cc94ccf5e70f3e (diff) |
Clear the echo and delay lines even if the buffer doesn't change size
Diffstat (limited to 'Alc/alcReverb.c')
-rw-r--r-- | Alc/alcReverb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/alcReverb.c b/Alc/alcReverb.c index 7579933e..2cfe341e 100644 --- a/Alc/alcReverb.c +++ b/Alc/alcReverb.c @@ -431,9 +431,6 @@ ALboolean VerbDeviceUpdate(ALeffectState *effect, ALCdevice *Device) State->TotalLength = totalLength; State->SampleBuffer = temp; - for(index = 0; index < totalLength;index++) - State->SampleBuffer[index] = 0.0f; - // All lines share a single sample buffer State->Delay.Mask = length[0] - 1; State->Delay.Line = &State->SampleBuffer[0]; @@ -466,6 +463,9 @@ ALboolean VerbDeviceUpdate(ALeffectState *effect, ALCdevice *Device) Device->Frequency); } + for(index = 0;index < State->TotalLength;index++) + State->SampleBuffer[index] = 0.0f; + return AL_TRUE; } |