diff options
author | Paul Gilbert | 2016-07-26 19:48:14 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-26 19:48:14 -0400 |
commit | 504cf6ecb688a3f1c65a857bffd527d8b0e6ba63 (patch) | |
tree | 0c0d96d4061c11850c851f0fc981c75a58c20515 /audio/softsynth/fluidsynth.cpp | |
parent | d8c28d15ae553d047b7e571f98727fa79ee143f3 (diff) | |
parent | e19922d181e775791f9105b8be7ff410770ede51 (diff) | |
download | scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.tar.gz scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.tar.bz2 scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.zip |
Merge branch 'master' into xeen
Diffstat (limited to 'audio/softsynth/fluidsynth.cpp')
-rw-r--r-- | audio/softsynth/fluidsynth.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp index 9b64d70f2b..860bf5b5cb 100644 --- a/audio/softsynth/fluidsynth.cpp +++ b/audio/softsynth/fluidsynth.cpp @@ -31,6 +31,9 @@ #include "audio/musicplugin.h" #include "audio/mpu401.h" #include "audio/softsynth/emumidi.h" +#if defined(IPHONE_IOS7) && defined(IPHONE_SANDBOXED) +#include "backends/platform/ios7/ios7_common.h" +#endif #include <fluidsynth.h> @@ -179,7 +182,18 @@ int MidiDriver_FluidSynth::open() { const char *soundfont = ConfMan.get("soundfont").c_str(); +#if defined(IPHONE_IOS7) && defined(IPHONE_SANDBOXED) + // HACK: Due to the sandbox on non-jailbroken iOS devices, we need to deal + // with the chroot filesystem. All the path selected by the user are + // relative to the Document directory. So, we need to adjust the path to + // reflect that. + Common::String soundfont_fullpath = iOS7_getDocumentsDir(); + soundfont_fullpath += soundfont; + _soundFont = fluid_synth_sfload(_synth, soundfont_fullpath.c_str(), 1); +#else _soundFont = fluid_synth_sfload(_synth, soundfont, 1); +#endif + if (_soundFont == -1) error("Failed loading custom sound font '%s'", soundfont); |