diff options
author | Chris Robinson <[email protected]> | 2014-02-27 02:20:51 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-02-27 02:20:51 -0800 |
commit | 6e7c0e15eb0c70f215696a5aade043aa564b48bd (patch) | |
tree | 6324c6b460d9216db8235acab351466a18a6baba | |
parent | fd3acf19fe0a51798944da2e440246b20c7cbb85 (diff) |
Use OpenDataFile to load soundfonts relative to data directories
-rw-r--r-- | OpenAL32/alSoundfont.c | 2 | ||||
-rw-r--r-- | alsoftrc.sample | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/OpenAL32/alSoundfont.c b/OpenAL32/alSoundfont.c index 355c5b41..a89ce4d1 100644 --- a/OpenAL32/alSoundfont.c +++ b/OpenAL32/alSoundfont.c @@ -469,7 +469,7 @@ ALsoundfont *ALsoundfont_getDefSoundfont(ALCcontext *context) { FILE *f; - f = fopen(fname, "rb"); + f = OpenDataFile(fname, "openal/soundfonts"); if(f == NULL) ERR("Failed to open %s\n", fname); else diff --git a/alsoftrc.sample b/alsoftrc.sample index f2dcb237..fb36fca9 100644 --- a/alsoftrc.sample +++ b/alsoftrc.sample @@ -194,7 +194,13 @@ ## soundfont: # A default soundfont (sf2 format). Used when an app requests the system -# default. +# default. The listed file is relative to system-dependant data directories. +# On Windows this is: +# %AppData%\openal\soundfonts +# And on other systems, it's (in order): +# $XDG_DATA_HOME/openal/soundfonts +# $XDG_DATA_DIRS/openal/soundfonts +# An absolute path may also be specified, if the given file is elsewhere. #soundfont = ## volume: |