From e7cf589868480022599f6935997ef45963fc3f5a Mon Sep 17 00:00:00 2001 From: Ghislain Antony Vaillant Date: Sun, 4 Apr 2021 21:07:10 +0200 Subject: [PATCH] Fix: Honor default soundfont for FluidSynth Debian now provides a default soundfont for FluidSynth via its alternatives system. In short, FluidSynth is configured to look for `/usr/share/sounds/sf3/default-GM.sf3` as its default soundfont, and each soundfront package (FluidR3, OPL-3, MuseScore...) may provide or override this symlink. By default, FluidSynth is installed on Debian with the `TimGM6mb` soundfont by default due to its limited size. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929185 for further details. --- src/music/fluidsynth.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/music/fluidsynth.cpp b/src/music/fluidsynth.cpp index acbc4a47ea..000432e1da 100644 --- a/src/music/fluidsynth.cpp +++ b/src/music/fluidsynth.cpp @@ -29,7 +29,15 @@ static FMusicDriver_FluidSynth iFMusicDriver_FluidSynth; /** List of sound fonts to try by default. */ static const char *default_sf[] = { - /* Debian/Ubuntu/OpenSUSE preferred */ + /* FluidSynth preferred */ + /* See: https://www.fluidsynth.org/api/settings_synth.html#settings_synth_default-soundfont */ + "/usr/share/soundfonts/default.sf2", + + /* Debian/Ubuntu preferred */ + /* See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929185 */ + "/usr/share/sounds/sf3/default-GM.sf3", + + /* OpenSUSE preferred */ "/usr/share/sounds/sf2/FluidR3_GM.sf2", /* RedHat/Fedora/Arch preferred */