games/scummvm: Unbreak build with FLUIDSYNTH=on
After commit 4c2db26adf
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💯
[..]
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
This commit is contained in:
parent
5ea8f2d8a1
commit
05a45a5e50
1 changed files with 31 additions and 0 deletions
31
games/scummvm/files/patch-audio_softsynth_fluidsynth.cpp
Normal file
31
games/scummvm/files/patch-audio_softsynth_fluidsynth.cpp
Normal file
|
@ -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
|
Loading…
Reference in a new issue