correct preset fallback on drum channels

This commit is contained in:
derselbst 2017-07-15 17:53:10 +02:00
parent f16c068962
commit 59bbdf1454
1 changed files with 2 additions and 1 deletions

View File

@ -1970,8 +1970,9 @@ fluid_synth_program_change(fluid_synth_t* synth, int chan, int prognum)
/* Fallback to another preset if not found */
if (!preset) {
/* Percussion: Fallback to preset 0 in percussion bank */
if (subst_bank == DRUM_INST_BANK) {
if (channel->channel_type == CHANNEL_TYPE_DRUM) {
subst_prog = 0;
subst_bank = DRUM_INST_BANK;
preset = fluid_synth_find_preset(synth, subst_bank, subst_prog);
}
/* Melodic instrument */