mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 15:01:40 +00:00
consolidate parameters checking
- out_from_chan must be in range [-1..synth->audio_groups[ - fx_from_chan must be in range [-1..synth-effects_groups[
This commit is contained in:
parent
7728ed6102
commit
226a6de812
1 changed files with 4 additions and 2 deletions
|
@ -7537,7 +7537,8 @@ fluid_synth_mixer_set_mapping(fluid_synth_t *synth,
|
|||
{
|
||||
/* check chan_to_out and out_from_chan */
|
||||
if((chan_to_out >= synth->midi_channels)
|
||||
||(out_from_chan >= synth->audio_groups))
|
||||
||(out_from_chan < -1)
|
||||
||(out_from_chan >= synth->audio_groups))
|
||||
{
|
||||
FLUID_API_RETURN(FLUID_FAILED);
|
||||
}
|
||||
|
@ -7553,7 +7554,8 @@ fluid_synth_mixer_set_mapping(fluid_synth_t *synth,
|
|||
{
|
||||
/* check chan_to_fx and fx_from_chan */
|
||||
if((chan_to_fx >= synth->midi_channels)
|
||||
||(fx_from_chan >= synth->effects_groups))
|
||||
||(fx_from_chan < -1)
|
||||
||(fx_from_chan >= synth->effects_groups))
|
||||
{
|
||||
FLUID_API_RETURN(FLUID_FAILED);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue