From c7789c0e58f7458eaca7afdd1f5ee84ebd904723 Mon Sep 17 00:00:00 2001 From: derselbst Date: Fri, 20 Oct 2017 20:38:37 +0200 Subject: [PATCH] fluid_synth_system_reset: avoid code duplication reuse fluid_synth_all_sounds_off_LOCAL() --- src/synth/fluid_synth.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c index c2508389..f18fe56e 100644 --- a/src/synth/fluid_synth.c +++ b/src/synth/fluid_synth.c @@ -1742,12 +1742,7 @@ fluid_synth_system_reset_LOCAL(fluid_synth_t* synth) fluid_voice_t* voice; int i; - for (i = 0; i < synth->polyphony; i++) { - voice = synth->voice[i]; - - if (fluid_voice_is_playing(voice)) - fluid_voice_off(voice); - } + fluid_synth_all_sounds_off_LOCAL(synth, -1); for (i = 0; i < synth->midi_channels; i++) fluid_channel_reset(synth->channel[i]);