diff --git a/src/synth/fluid_voice.c b/src/synth/fluid_voice.c index c53dfa05..72b087d0 100644 --- a/src/synth/fluid_voice.c +++ b/src/synth/fluid_voice.c @@ -488,7 +488,22 @@ fluid_voice_calculate_gen_pitch(fluid_voice_t* voice) } -static int const list_of_generators_to_initialize[] = { +/* + * fluid_voice_calculate_runtime_synthesis_parameters + * + * in this function we calculate the values of all the parameters. the + * parameters are converted to their most useful unit for the DSP + * algorithm, for example, number of samples instead of + * timecents. Some parameters keep their "perceptual" unit and + * conversion will be done in the DSP function. This is the case, for + * example, for the pitch since it is modulated by the controllers in + * cents. */ +static int +fluid_voice_calculate_runtime_synthesis_parameters(fluid_voice_t* voice) +{ + unsigned int i; + + static int const list_of_generators_to_initialize[] = { GEN_STARTADDROFS, /* SF2.01 page 48 #0 */ GEN_ENDADDROFS, /* #1 */ GEN_STARTLOOPADDROFS, /* #2 */ @@ -539,22 +554,7 @@ static int const list_of_generators_to_initialize[] = { /* GEN_FINETUNE [1] #52 */ GEN_OVERRIDEROOTKEY, /* #58 */ GEN_PITCH /* --- */ -}; - -/* - * fluid_voice_calculate_runtime_synthesis_parameters - * - * in this function we calculate the values of all the parameters. the - * parameters are converted to their most useful unit for the DSP - * algorithm, for example, number of samples instead of - * timecents. Some parameters keep their "perceptual" unit and - * conversion will be done in the DSP function. This is the case, for - * example, for the pitch since it is modulated by the controllers in - * cents. */ -static int -fluid_voice_calculate_runtime_synthesis_parameters(fluid_voice_t* voice) -{ - unsigned int i; + }; /* When the voice is made ready for the synthesis process, a lot of * voice-internal parameters have to be calculated.