simplify fluid_synth_mixer_get_mapping()

This commit is contained in:
jjceresa 2020-09-08 15:49:51 +02:00
parent 77abe1a9f5
commit 373644908c

View file

@ -7468,15 +7468,8 @@ fluid_synth_mixer_get_mapping(fluid_synth_t *synth,
{ {
/*fx unit mapped to chan */ /*fx unit mapped to chan */
int fxunit_idx = synth->channel[chan]->mapping_to_fx; int fxunit_idx = synth->channel[chan]->mapping_to_fx;
if(fxunit_idx >= 0) fluid_rvoice_mixer_t *mixer = synth->eventhandler->mixer;
{ *out_from_fx = fluid_rvoice_mixer_get_fx_out_mapping(mixer, fxunit_idx);
fluid_rvoice_mixer_t *mixer = synth->eventhandler->mixer;
*out_from_fx = fluid_rvoice_mixer_get_fx_out_mapping(mixer, fxunit_idx);
}
else
{
*out_from_fx = -1; /* there is no fx unit mapped to chan */
}
} }
FLUID_API_RETURN(FLUID_OK); FLUID_API_RETURN(FLUID_OK);