From 64d4fe0402a2e8711788b0dc9c3612beb75d0eff Mon Sep 17 00:00:00 2001 From: derselbst Date: Fri, 25 Oct 2019 15:23:40 +0200 Subject: [PATCH] Fix chorus buffer line being partly uninitialized --- src/rvoice/fluid_chorus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rvoice/fluid_chorus.c b/src/rvoice/fluid_chorus.c index 191979b6..5cac3a31 100644 --- a/src/rvoice/fluid_chorus.c +++ b/src/rvoice/fluid_chorus.c @@ -611,13 +611,13 @@ fluid_chorus_reset(fluid_chorus_t *chorus) int i; /* reset delay line */ - for(i = 0; i < MAX_SAMPLES; i++) + for(i = 0; i < chorus->size; i++) { - chorus->line[i] = 0.0; + chorus->line[i] = 0; } /* reset modulators's allpass filter */ - for(i = 0; i < MAX_CHORUS; i++) + for(i = 0; i < FLUID_N_ELEMENTS(chorus->mod); i++) { /* initializes 1st order All-Pass interpolator members */ chorus->mod[i].buffer = 0; /* previous delay sample value */