mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-27 06:22:06 +00:00
Check first MIDI files then Soundfonts files in fluidsynth.c (#731)
This commit is contained in:
parent
a14c70cbbd
commit
0ae16f6a2b
1 changed files with 6 additions and 1 deletions
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue