From 57de2bf45a37bd9136417973eb2a9e05bdea5f30 Mon Sep 17 00:00:00 2001 From: carlo-bramini <30959007+carlo-bramini@users.noreply.github.com> Date: Fri, 19 Jan 2018 11:01:35 +0100 Subject: [PATCH] No need to do extra addition at every cycle. --- src/rvoice/fluid_chorus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rvoice/fluid_chorus.c b/src/rvoice/fluid_chorus.c index d3422bae..935f9f07 100644 --- a/src/rvoice/fluid_chorus.c +++ b/src/rvoice/fluid_chorus.c @@ -514,11 +514,11 @@ fluid_chorus_triangle(int *buf, int len, int depth) incr = 2.0 / len * (double)depth * (double) INTERPOLATION_SUBSAMPLES; /* Initialize first value */ - val = 0.; + val = 0. - 3. * MAX_SAMPLES * INTERPOLATION_SUBSAMPLES; /* Build triangular modulation waveform */ while (il <= ir) { - ival= (int)(val + 0.5) - 3 * MAX_SAMPLES * INTERPOLATION_SUBSAMPLES; + ival= (int)(val + 0.5); *il++ = ival; *ir-- = ival;