mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 23:11:41 +00:00
Also consider channel pressure, key pressure and pitchwheel modulators when calculating lower attenuation boundary.
This commit is contained in:
parent
50b6e9462e
commit
9766acc41a
1 changed files with 8 additions and 1 deletions
|
@ -1568,7 +1568,14 @@ fluid_voice_get_lower_boundary_for_attenuation(fluid_voice_t* voice)
|
||||||
|
|
||||||
/* Modulator has attenuation as target and can change over time? */
|
/* Modulator has attenuation as target and can change over time? */
|
||||||
if ((mod->dest == GEN_ATTENUATION)
|
if ((mod->dest == GEN_ATTENUATION)
|
||||||
&& ((mod->flags1 & FLUID_MOD_CC) || (mod->flags2 & FLUID_MOD_CC))) {
|
&& ((mod->flags1 & FLUID_MOD_CC)
|
||||||
|
|| (mod->flags2 & FLUID_MOD_CC)
|
||||||
|
|| (mod->src1 == FLUID_MOD_CHANNELPRESSURE)
|
||||||
|
|| (mod->src1 == FLUID_MOD_KEYPRESSURE)
|
||||||
|
|| (mod->src1 == FLUID_MOD_PITCHWHEEL)
|
||||||
|
|| (mod->src2 == FLUID_MOD_CHANNELPRESSURE)
|
||||||
|
|| (mod->src2 == FLUID_MOD_KEYPRESSURE)
|
||||||
|
|| (mod->src2 == FLUID_MOD_PITCHWHEEL))) {
|
||||||
|
|
||||||
fluid_real_t current_val = fluid_mod_get_value(mod, voice->channel, voice);
|
fluid_real_t current_val = fluid_mod_get_value(mod, voice->channel, voice);
|
||||||
fluid_real_t v = fabs(mod->amount);
|
fluid_real_t v = fabs(mod->amount);
|
||||||
|
|
Loading…
Reference in a new issue