From c99456ecff9ae645385ea5a8aa423d0115dce08e Mon Sep 17 00:00:00 2001 From: Vincent Bénony Date: Fri, 11 Dec 2015 14:24:29 +0100 Subject: IOS: Brings support for FluidSynth --- audio/softsynth/fluidsynth.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'audio/softsynth') 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 +#include +#include "backends/platform/ios7/ios7_common.h" +#endif #include @@ -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); -- cgit v1.2.3