diff options
author | Vincent Bénony | 2015-12-11 14:24:29 +0100 |
---|---|---|
committer | Vincent Bénony | 2016-01-06 16:17:38 +0100 |
commit | c99456ecff9ae645385ea5a8aa423d0115dce08e (patch) | |
tree | 7e1e06045bf88f054d7521655d12ee12ede76a64 /audio | |
parent | 8d9b13059b82ea4b8a38203c34c4939abc0feb25 (diff) | |
download | scummvm-rg350-c99456ecff9ae645385ea5a8aa423d0115dce08e.tar.gz scummvm-rg350-c99456ecff9ae645385ea5a8aa423d0115dce08e.tar.bz2 scummvm-rg350-c99456ecff9ae645385ea5a8aa423d0115dce08e.zip |
IOS: Brings support for FluidSynth
Diffstat (limited to 'audio')
-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..372a370db4 100644 --- a/audio/softsynth/fluidsynth.cpp +++ b/audio/softsynth/fluidsynth.cpp @@ -31,6 +31,11 @@ #include "audio/musicplugin.h" #include "audio/mpu401.h" #include "audio/softsynth/emumidi.h" +#ifdef IPHONE_OFFICIAL +#include <string.h> +#include <sys/syslimits.h> +#include "backends/platform/ios7/ios7_common.h" +#endif #include <fluidsynth.h> @@ -179,7 +184,16 @@ int MidiDriver_FluidSynth::open() { const char *soundfont = ConfMan.get("soundfont").c_str(); +#ifdef IPHONE_OFFICIAL + char *soundfont_fullpath[PATH_MAX]; + const char *document_path = iOS7_getDocumentsDir(); + strcpy((char *) soundfont_fullpath, document_path); + strcat((char *) soundfont_fullpath, soundfont); + _soundFont = fluid_synth_sfload(_synth, (const char *) soundfont_fullpath, 1); +#else _soundFont = fluid_synth_sfload(_synth, soundfont, 1); +#endif + if (_soundFont == -1) error("Failed loading custom sound font '%s'", soundfont); |