diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c index 19cb65bf..63c26ec4 100644 --- a/src/synth/fluid_synth.c +++ b/src/synth/fluid_synth.c @@ -4527,14 +4527,13 @@ fluid_synth_kill_by_exclusive_class_LOCAL(fluid_synth_t *synth, for(i = 0; i < synth->polyphony; i++) { fluid_voice_t *existing_voice = synth->voice[i]; - int existing_excl_class = fluid_voice_gen_value(existing_voice, GEN_EXCLUSIVECLASS); /* If voice is playing, on the same channel, has same exclusive * class and is not part of the same noteon event (voice group), then kill it */ if(fluid_voice_is_playing(existing_voice) && fluid_voice_get_channel(existing_voice) == fluid_voice_get_channel(new_voice) - && existing_excl_class == excl_class + && fluid_voice_gen_value(existing_voice, GEN_EXCLUSIVECLASS) == excl_class && fluid_voice_get_id(existing_voice) != fluid_voice_get_id(new_voice)) { fluid_voice_kill_excl(existing_voice);