mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-14 16:40:43 +00:00
Remove redundant invalid preset generators checking in fluid_defpreset_noteon() (#430)
This commit is contained in:
parent
457edfcdda
commit
75b77f0186
1 changed files with 32 additions and 35 deletions
|
@ -833,21 +833,19 @@ fluid_defpreset_noteon(fluid_defpreset_t *defpreset, fluid_synth_t *synth, int c
|
||||||
{
|
{
|
||||||
|
|
||||||
/* SF 2.01 section 8.5 page 58: If some generators are
|
/* SF 2.01 section 8.5 page 58: If some generators are
|
||||||
* encountered at preset level, they should be ignored */
|
encountered at preset level, they should be ignored.
|
||||||
if((i != GEN_STARTADDROFS)
|
However this check is not necessary when the soundfont
|
||||||
&& (i != GEN_ENDADDROFS)
|
loader has ignored invalid preset generators.
|
||||||
&& (i != GEN_STARTLOOPADDROFS)
|
Actually load_pgen()has ignored these invalid preset
|
||||||
&& (i != GEN_ENDLOOPADDROFS)
|
generators:
|
||||||
&& (i != GEN_STARTADDRCOARSEOFS)
|
GEN_STARTADDROFS, GEN_ENDADDROFS,
|
||||||
&& (i != GEN_ENDADDRCOARSEOFS)
|
GEN_STARTLOOPADDROFS, GEN_ENDLOOPADDROFS,
|
||||||
&& (i != GEN_STARTLOOPADDRCOARSEOFS)
|
GEN_STARTADDRCOARSEOFS,GEN_ENDADDRCOARSEOFS,
|
||||||
&& (i != GEN_KEYNUM)
|
GEN_STARTLOOPADDRCOARSEOFS,
|
||||||
&& (i != GEN_VELOCITY)
|
GEN_KEYNUM, GEN_VELOCITY,
|
||||||
&& (i != GEN_ENDLOOPADDRCOARSEOFS)
|
GEN_ENDLOOPADDRCOARSEOFS,
|
||||||
&& (i != GEN_SAMPLEMODE)
|
GEN_SAMPLEMODE, GEN_EXCLUSIVECLASS,GEN_OVERRIDEROOTKEY
|
||||||
&& (i != GEN_EXCLUSIVECLASS)
|
*/
|
||||||
&& (i != GEN_OVERRIDEROOTKEY))
|
|
||||||
{
|
|
||||||
|
|
||||||
/* SF 2.01 section 9.4 'bullet' 9: A generator in a
|
/* SF 2.01 section 9.4 'bullet' 9: A generator in a
|
||||||
* local preset zone supersedes a global preset zone
|
* local preset zone supersedes a global preset zone
|
||||||
|
@ -868,7 +866,6 @@ fluid_defpreset_noteon(fluid_defpreset_t *defpreset, fluid_synth_t *synth, int c
|
||||||
* Do nothing, leave it unchanged.
|
* Do nothing, leave it unchanged.
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
} /* if available at preset level */
|
|
||||||
} /* for all generators */
|
} /* for all generators */
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue