mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-02 17:12:15 +00:00
simplify check for default_vel2filter_mod
This commit is contained in:
parent
d9a39e8ba7
commit
dd2b78a842
1 changed files with 3 additions and 7 deletions
|
@ -296,6 +296,8 @@ fluid_mod_transform_source_value(fluid_real_t val, unsigned char mod_flags, cons
|
||||||
fluid_real_t
|
fluid_real_t
|
||||||
fluid_mod_get_value(fluid_mod_t* mod, fluid_channel_t* chan, fluid_voice_t* voice)
|
fluid_mod_get_value(fluid_mod_t* mod, fluid_channel_t* chan, fluid_voice_t* voice)
|
||||||
{
|
{
|
||||||
|
extern fluid_mod_t default_vel2filter_mod;
|
||||||
|
|
||||||
fluid_real_t v1 = 0.0, v2 = 1.0;
|
fluid_real_t v1 = 0.0, v2 = 1.0;
|
||||||
fluid_real_t range1 = 127.0, range2 = 127.0;
|
fluid_real_t range1 = 127.0, range2 = 127.0;
|
||||||
|
|
||||||
|
@ -324,13 +326,7 @@ fluid_mod_get_value(fluid_mod_t* mod, fluid_channel_t* chan, fluid_voice_t* voic
|
||||||
* described in section 8.4.2, but it matches the definition used in
|
* described in section 8.4.2, but it matches the definition used in
|
||||||
* several SF2.1 sound fonts (where it is used only to turn it off).
|
* several SF2.1 sound fonts (where it is used only to turn it off).
|
||||||
* */
|
* */
|
||||||
if ((mod->src2 == FLUID_MOD_VELOCITY) &&
|
if (fluid_mod_test_identity(mod, &default_vel2filter_mod)) {
|
||||||
(mod->src1 == FLUID_MOD_VELOCITY) &&
|
|
||||||
(mod->flags1 == (FLUID_MOD_GC | FLUID_MOD_UNIPOLAR
|
|
||||||
| FLUID_MOD_NEGATIVE | FLUID_MOD_LINEAR)) &&
|
|
||||||
(mod->flags2 == (FLUID_MOD_GC | FLUID_MOD_UNIPOLAR
|
|
||||||
| FLUID_MOD_POSITIVE | FLUID_MOD_SWITCH)) &&
|
|
||||||
(mod->dest == GEN_FILTERFC)) {
|
|
||||||
// S. Christian Collins' mod, to stop forcing velocity based filtering
|
// S. Christian Collins' mod, to stop forcing velocity based filtering
|
||||||
/*
|
/*
|
||||||
if (voice->vel < 64){
|
if (voice->vel < 64){
|
||||||
|
|
Loading…
Reference in a new issue