aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-11-28 04:16:46 -0800
committerChris Robinson <[email protected]>2013-11-28 04:16:46 -0800
commit98b0a3187e4bf190fa844aa620459f04556c980b (patch)
tree80b54dd2219852f69a4347c4fe2c53d71056fe88
parent7794e5366747a402d386f5fd559d0e433ed7cffb (diff)
Add a config option for specifying the default MIDI soundfont
-rw-r--r--OpenAL32/alMidi.c4
-rw-r--r--alsoftrc.sample10
2 files changed, 12 insertions, 2 deletions
diff --git a/OpenAL32/alMidi.c b/OpenAL32/alMidi.c
index 3bc61aae..27a02a62 100644
--- a/OpenAL32/alMidi.c
+++ b/OpenAL32/alMidi.c
@@ -204,8 +204,8 @@ static void FSynth_setState(FSynth *self, ALenum state)
{
if(self->FontID == FLUID_FAILED)
{
- const char *filename = getenv("FLUID_SOUNDFONT");
- if(!filename || !filename[0])
+ const char *filename = GetConfigValue("midi", "soundfont", "");
+ if(!filename[0])
ERR("No default soundfont found!\n");
else
{
diff --git a/alsoftrc.sample b/alsoftrc.sample
index bb5bb088..e5c9056c 100644
--- a/alsoftrc.sample
+++ b/alsoftrc.sample
@@ -184,6 +184,16 @@
#trap-al-error = false
##
+## MIDI interface stuff (EXPERIMENTAL)
+##
+[midi]
+
+## soundfont:
+# A default soundfont (sf2 format). Used when an app uses the MIDI interface
+# without specifying its own soundfont.
+#soundfont =
+
+##
## Reverb effect stuff (includes EAX reverb)
##
[reverb]