diff options
author | Robin Gareus <robin@gareus.org> | 2019-02-23 17:58:05 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-02-23 18:41:05 +0100 |
commit | 75134e8ccf706208d4f4c1354444550ccf967408 (patch) | |
tree | d4d247654f58cd440d4e2aadc05715fde4f07bc7 /libs/fluidsynth/src/fluid_voice.c | |
parent | 63fdfd9e8557f898e32612449c3ba77d79fde45c (diff) |
Update Fluidsynth to v2.0.4
see https://github.com/FluidSynth/fluidsynth/releases/tag/v2.0.4
Diffstat (limited to 'libs/fluidsynth/src/fluid_voice.c')
-rw-r--r-- | libs/fluidsynth/src/fluid_voice.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/libs/fluidsynth/src/fluid_voice.c b/libs/fluidsynth/src/fluid_voice.c index 7c6265745b..5c5ad35598 100644 --- a/libs/fluidsynth/src/fluid_voice.c +++ b/libs/fluidsynth/src/fluid_voice.c @@ -18,7 +18,7 @@ * 02110-1301, USA */ -#include "fluidsynth_priv.h" +#include "fluid_sys.h" #include "fluid_voice.h" #include "fluid_mod.h" #include "fluid_chan.h" @@ -428,17 +428,7 @@ fluid_voice_gen_get(fluid_voice_t *voice, int gen) fluid_real_t fluid_voice_gen_value(const fluid_voice_t *voice, int num) { - /* This is an extension to the SoundFont standard. More - * documentation is available at the fluid_synth_set_gen2() - * function. */ - if(voice->gen[num].flags == GEN_ABS_NRPN) - { - return (fluid_real_t) voice->gen[num].nrpn; - } - else - { - return (fluid_real_t)(voice->gen[num].val + voice->gen[num].mod + voice->gen[num].nrpn); - } + return (fluid_real_t)(voice->gen[num].val + voice->gen[num].mod + voice->gen[num].nrpn); } /* @@ -605,7 +595,7 @@ fluid_voice_calculate_runtime_synthesis_parameters(fluid_voice_t *voice) * - Add the output value to the modulation value of the generator. * * Note: The generators have been initialized with - * fluid_gen_set_default_values. + * fluid_gen_init(). */ for(i = 0; i < voice->mod_count; i++) @@ -1789,10 +1779,10 @@ fluid_voice_get_lower_boundary_for_attenuation(fluid_voice_t *voice) -int fluid_voice_set_param(fluid_voice_t *voice, int gen, fluid_real_t nrpn_value, int abs) +int fluid_voice_set_param(fluid_voice_t *voice, int gen, fluid_real_t nrpn_value) { voice->gen[gen].nrpn = nrpn_value; - voice->gen[gen].flags = (abs) ? GEN_ABS_NRPN : GEN_SET; + voice->gen[gen].flags = GEN_SET; fluid_voice_update_param(voice, gen); return FLUID_OK; } |