From 98b0a3187e4bf190fa844aa620459f04556c980b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 28 Nov 2013 04:16:46 -0800 Subject: Add a config option for specifying the default MIDI soundfont --- OpenAL32/alMidi.c | 4 ++-- alsoftrc.sample | 10 ++++++++++ 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 @@ -183,6 +183,16 @@ # of a context error. On Windows, a breakpoint exception is generated. #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) ## -- cgit v1.2.3