mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 06:51:54 +00:00
Fix incorrect comment (#488)
Normalized value of MIDI sources (before unipolar or bipolar mapping) is always in the range [0..+1], regardless of MIDI event (even for FLUID_MOD_PITCHWHEEL).
This commit is contained in:
parent
d666515c31
commit
458cea0aff
1 changed files with 1 additions and 4 deletions
|
@ -245,10 +245,7 @@ fluid_mod_get_source_value(const unsigned char mod_src,
|
||||||
static fluid_real_t
|
static fluid_real_t
|
||||||
fluid_mod_transform_source_value(fluid_real_t val, unsigned char mod_flags, const fluid_real_t range)
|
fluid_mod_transform_source_value(fluid_real_t val, unsigned char mod_flags, const fluid_real_t range)
|
||||||
{
|
{
|
||||||
/* normalized value, i.e. usually in the range [0;1]
|
/* normalized value, i.e. usually in the range [0;1] */
|
||||||
*
|
|
||||||
* if val was retrieved from pitch_bend then [-0.5;0.5]
|
|
||||||
*/
|
|
||||||
const fluid_real_t val_norm = val / range;
|
const fluid_real_t val_norm = val / range;
|
||||||
|
|
||||||
/* we could also only switch case the lower nibble of mod_flags, however
|
/* we could also only switch case the lower nibble of mod_flags, however
|
||||||
|
|
Loading…
Reference in a new issue