simplify fluid_handle_chanmap()

This commit is contained in:
jjceresa 2020-09-16 17:34:26 +02:00
parent 3e08cb062c
commit 2d4d132214

View file

@ -3408,18 +3408,17 @@ int fluid_handle_chanmap(void *data, int ac, char **av,
for(i = 0; i < n; i++)
{
int result1, result2 = FLUID_OK;
int result;
int out_from_chan, fx_from_chan, out_from_fx = -1;
int chan = ac ? atoi(av[i]) : i;
result1 = fluid_synth_mixer_get_channel_mapping(synth, chan, &out_from_chan,
result = fluid_synth_mixer_get_channel_mapping(synth, chan, &out_from_chan,
&fx_from_chan);
if((result1 == FLUID_OK) && (fx_from_chan >= 0))
if((result == FLUID_OK) && (fx_from_chan >= 0))
{
result2 = fluid_synth_mixer_get_fx_mapping(synth, fx_from_chan,
&out_from_fx);
fluid_synth_mixer_get_fx_mapping(synth, fx_from_chan, &out_from_fx);
}
if((result1 == FLUID_OK) && (result2 == FLUID_OK))
if(result == FLUID_OK)
{
fluid_ostream_printf(out,
"channel:%3d,%7d,%6d,%7d\n",