diff options
author | Kai Knoblich <kai@FreeBSD.org> | 2021-10-04 09:14:03 +0000 |
---|---|---|
committer | Kai Knoblich <kai@FreeBSD.org> | 2021-10-04 09:14:03 +0000 |
commit | 05a45a5e50775e34b7c949ee3c6607dbb004b3a1 (patch) | |
tree | 0ee27d823720741928fdb78e2a48e5a5fe889498 | |
parent | 5ea8f2d8a19e7284731f588968c6045b86120cef (diff) | |
download | ports-05a45a5e50775e34b7c949ee3c6607dbb004b3a1.tar.gz ports-05a45a5e50775e34b7c949ee3c6607dbb004b3a1.zip |
games/scummvm: Unbreak build with FLUIDSYNTH=on
After commit 4c2db26adf7d the build, if the non-default option
FLUIDSYNTH is enabled, fails with:
In file included from audio/softsynth/fluidsynth.cpp:32:
In file included from /usr/local/include/fluidsynth.h:100:
[..]
audio/softsynth/fluidsynth.cpp:252:3: error:
no matching function for call to 'fluid_sfloader_set_callbacks'
fluid_sfloader_set_callbacks(soundFontMemoryLoader,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/fluidsynth/sfont.h:172:20: note:
candidate function not viable:
no known conversion from 'int (void *, int, void *)' to
'fluid_sfloader_callback_read_t' (aka 'int (*)(void *, long long, void *)') for 3rd argument
FLUIDSYNTH_API int fluid_sfloader_set_callbacks(fluid_sfloader_t *loader,
^
Obtained from: NetBSD
MFH: 2021Q4
-rw-r--r-- | games/scummvm/files/patch-audio_softsynth_fluidsynth.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/games/scummvm/files/patch-audio_softsynth_fluidsynth.cpp b/games/scummvm/files/patch-audio_softsynth_fluidsynth.cpp new file mode 100644 index 000000000000..e538d47910b4 --- /dev/null +++ b/games/scummvm/files/patch-audio_softsynth_fluidsynth.cpp @@ -0,0 +1,31 @@ +Fix build with FluidSynth >= 2.2.0 + +Obtained from: + +https://github.com/NetBSD/pkgsrc/commit/25b35d66ba06339121f9ed19cc0a307a7b61dfc9 + +--- audio/softsynth/fluidsynth.cpp.orig 2020-09-13 21:05:37 UTC ++++ audio/softsynth/fluidsynth.cpp +@@ -144,11 +144,11 @@ static void *SoundFontMemLoader_open(const char *filen + return p; + } + +-static int SoundFontMemLoader_read(void *buf, int count, void *handle) { ++static int SoundFontMemLoader_read(void *buf, long long count, void *handle) { + return ((Common::SeekableReadStream *) handle)->read(buf, count) == (uint32)count ? FLUID_OK : FLUID_FAILED; + } + +-static int SoundFontMemLoader_seek(void *handle, long offset, int origin) { ++static int SoundFontMemLoader_seek(void *handle, long long offset, int origin) { + return ((Common::SeekableReadStream *) handle)->seek(offset, origin) ? FLUID_OK : FLUID_FAILED; + } + +@@ -157,7 +157,7 @@ static int SoundFontMemLoader_close(void *handle) { + return FLUID_OK; + } + +-static long SoundFontMemLoader_tell(void *handle) { ++static long long SoundFontMemLoader_tell(void *handle) { + return ((Common::SeekableReadStream *) handle)->pos(); + } + #endif |