mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 06:51:54 +00:00
fluid_synth_add_default_mod: specify enum param type explicitly
This commit is contained in:
parent
336ae88aaf
commit
a89ed74537
2 changed files with 5 additions and 3 deletions
|
@ -270,7 +270,7 @@ enum fluid_synth_add_mod {
|
|||
FLUID_SYNTH_ADD, /**< Add (sum) modulator amounts */
|
||||
};
|
||||
|
||||
FLUIDSYNTH_API int fluid_synth_add_default_mod(fluid_synth_t* synth, fluid_mod_t* mod, int mode);
|
||||
FLUIDSYNTH_API int fluid_synth_add_default_mod(fluid_synth_t* synth, fluid_mod_t* mod, enum fluid_synth_add_mod mode);
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -1083,7 +1083,7 @@ fluid_synth_damp_voices_by_sostenuto_LOCAL(fluid_synth_t* synth, int chan)
|
|||
* @return FLUID_OK on success, FLUID_FAILED otherwise
|
||||
*/
|
||||
int
|
||||
fluid_synth_add_default_mod(fluid_synth_t* synth, fluid_mod_t* mod, int mode)
|
||||
fluid_synth_add_default_mod(fluid_synth_t* synth, fluid_mod_t* mod, enum fluid_synth_add_mod mode)
|
||||
{
|
||||
fluid_mod_t* default_mod;
|
||||
fluid_mod_t* last_mod = NULL;
|
||||
|
@ -1098,8 +1098,10 @@ fluid_synth_add_default_mod(fluid_synth_t* synth, fluid_mod_t* mod, int mode)
|
|||
if (fluid_mod_test_identity(default_mod, mod)) {
|
||||
if (mode == FLUID_SYNTH_ADD)
|
||||
default_mod->amount += mod->amount;
|
||||
else // FLUID_SYNTH_OVERWRITE
|
||||
else if (mode == FLUID_SYNTH_OVERWRITE)
|
||||
default_mod->amount = mod->amount;
|
||||
else
|
||||
FLUID_API_RETURN(FLUID_FAILED);
|
||||
FLUID_API_RETURN(FLUID_OK);
|
||||
}
|
||||
last_mod = default_mod;
|
||||
|
|
Loading…
Reference in a new issue