mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-04-22 15:42:54 +00:00
simplify fluid_handle_chanmap()
This commit is contained in:
parent
3e08cb062c
commit
2d4d132214
1 changed files with 5 additions and 6 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue