From 0ae16f6a2b4a6d3bfc62d5c57e18ee2241df5736 Mon Sep 17 00:00:00 2001 From: jjceresa <32781294+jjceresa@users.noreply.github.com> Date: Thu, 31 Dec 2020 10:28:12 +0100 Subject: [PATCH] Check first MIDI files then Soundfonts files in fluidsynth.c (#731) --- src/fluidsynth.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/fluidsynth.c b/src/fluidsynth.c index c1a3260e..2290a419 100644 --- a/src/fluidsynth.c +++ b/src/fluidsynth.c @@ -842,6 +842,11 @@ int main(int argc, char **argv) /* load the soundfonts (check that all non options are SoundFont or MIDI files) */ for(i = arg1; i < argc; i++) { + if(fluid_is_midifile(argv[i])) + { + continue; + } + if(fluid_is_soundfont(argv[i])) { if(fluid_synth_sfload(synth, argv[i], 1) == -1) @@ -849,7 +854,7 @@ int main(int argc, char **argv) fprintf(stderr, "Failed to load the SoundFont %s\n", argv[i]); } } - else if(!fluid_is_midifile(argv[i])) + else { fprintf(stderr, "Parameter '%s' not a SoundFont or MIDI file or error occurred identifying it.\n", argv[i]); }