Add default soundfont setting: synth.default-soundfont

This commit is contained in:
David Henningsson 2013-05-05 09:12:14 +00:00
parent ea6d033598
commit fda26d6b24
3 changed files with 16 additions and 0 deletions

View file

@ -1,6 +1,16 @@
# Several directory names used by FluidSynth to install files
# the variable names are similar to the KDE4 build system
# DEFAULT_SOUNDFONT - automatically loaded in some use cases
if ( WIN32 )
set (DEFAULT_SOUNDFONT "C:\\soundfonts\\default.sf2" CACHE STRING
"Default soundfont file")
else ( WIN32 )
set (DEFAULT_SOUNDFONT "share/soundfonts/default.sf2" CACHE STRING
"Default soundfont file")
endif ( WIN32 )
mark_as_advanced (DEFAULT_SOUNDFONT)
# BUNDLE_INSTALL_DIR - Mac only: the directory for application bundles
set (BUNDLE_INSTALL_DIR "/Applications" CACHE STRING
"The install dir for application bundles")

View file

@ -22,6 +22,9 @@
/* Define if D-Bus support is enabled */
#cmakedefine DBUS_SUPPORT @DBUS_SUPPORT@
/* Soundfont to load automatically in some use cases */
#cmakedefine DEFAULT_SOUNDFONT "@DEFAULT_SOUNDFONT@"
/* Define to enable FPE checks */
#cmakedefine FPE_CHECK @FPE_CHECK@

View file

@ -189,6 +189,9 @@ void fluid_synth_settings(fluid_settings_t* settings)
FLUID_HINT_TOGGLED, NULL, NULL);
fluid_settings_register_str(settings, "midi.portname", "", 0, NULL, NULL);
fluid_settings_register_str(settings, "synth.default-soundfont",
DEFAULT_SOUNDFONT, 0, NULL, NULL);
fluid_settings_register_int(settings, "synth.polyphony",
256, 1, 65535, 0, NULL, NULL);
fluid_settings_register_int(settings, "synth.midi-channels",