 
            From: Anton Baskanov baskanov@gmail.com
Based on upstream commit e94455cbe5a05f200498b37ac230df83d04c2fe3. --- dlls/dmsynth/tests/dmsynth.c | 4 ++-- libs/fluidsynth/src/synth/fluid_mod.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/dmsynth/tests/dmsynth.c b/dlls/dmsynth/tests/dmsynth.c index 6293c1ea4bd..cb19e4997b8 100644 --- a/dlls/dmsynth/tests/dmsynth.c +++ b/dlls/dmsynth/tests/dmsynth.c @@ -1766,7 +1766,7 @@ static void test_IKsControl(void) ok(hr == DMUS_E_UNKNOWN_PROPERTY, "got hr %#lx.\n", hr);
/* default value for volume 0 is 0 */ - check_volume_envelope(synth, &default_instrument_download, &default_midi, &default_volume_envelope, TRUE); + check_volume_envelope(synth, &default_instrument_download, &default_midi, &default_volume_envelope, FALSE);
volume = 0; property.Set = GUID_DMUS_PROP_Volume; @@ -1774,7 +1774,7 @@ static void test_IKsControl(void) property.Flags = KSPROPERTY_TYPE_SET; hr = IKsControl_KsProperty(control, &property, sizeof(property), &volume, sizeof(volume), &volume_size); ok(hr == S_OK, "got hr %#lx.\n", hr); - check_volume_envelope(synth, &default_instrument_download, &default_midi, &default_volume_envelope, TRUE); + check_volume_envelope(synth, &default_instrument_download, &default_midi, &default_volume_envelope, FALSE);
/* total voice gain is limited to 6 dB */ volume = 600; diff --git a/libs/fluidsynth/src/synth/fluid_mod.c b/libs/fluidsynth/src/synth/fluid_mod.c index 6801f13add7..ecdf25a21c1 100644 --- a/libs/fluidsynth/src/synth/fluid_mod.c +++ b/libs/fluidsynth/src/synth/fluid_mod.c @@ -277,7 +277,7 @@ fluid_mod_transform_source_value(fluid_real_t val, unsigned char mod_flags, cons /* normalized value, i.e. usually in the range [0;1] */ const fluid_real_t val_norm = val / range; /* inverted value used for negative mapping functions */ - const fluid_real_t inv_norm = 1.0f - val_norm; + const fluid_real_t inv_norm = 1.0f - 1.0f / range - val_norm;
/* we could also only switch case the lower nibble of mod_flags, however * this would keep us from adding further mod types in the future