From: Ozkan Sezer Date: Fri, 5 Feb 2021 21:37:50 +0300 Subject: fluidsynth (delete_fluid_player, delete_fluid_synth): adjust signatures Origin: upstream, commit:0c504159d212b710a47cb25c669b21730fc78edd Bug-Debian: https://bugs.debian.org/1075497 --- dynamic_fluidsynth.c | 7 ++++++- dynamic_fluidsynth.h | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dynamic_fluidsynth.c b/dynamic_fluidsynth.c index 73c687f..8ca1fe7 100644 --- a/dynamic_fluidsynth.c +++ b/dynamic_fluidsynth.c @@ -48,9 +48,14 @@ int Mix_InitFluidSynth() if ( fluidsynth.handle == NULL ) return -1; #endif +#if (FLUIDSYNTH_VERSION_MAJOR >= 2) + FLUIDSYNTH_LOADER(delete_fluid_player, void (*)(fluid_player_t*)); + FLUIDSYNTH_LOADER(delete_fluid_synth, void (*)(fluid_synth_t*)); +#else FLUIDSYNTH_LOADER(delete_fluid_player, int (*)(fluid_player_t*)); - FLUIDSYNTH_LOADER(delete_fluid_settings, void (*)(fluid_settings_t*)); FLUIDSYNTH_LOADER(delete_fluid_synth, int (*)(fluid_synth_t*)); +#endif + FLUIDSYNTH_LOADER(delete_fluid_settings, void (*)(fluid_settings_t*)); FLUIDSYNTH_LOADER(fluid_player_add, int (*)(fluid_player_t*, const char*)); FLUIDSYNTH_LOADER(fluid_player_add_mem, int (*)(fluid_player_t*, const void*, size_t)); FLUIDSYNTH_LOADER(fluid_player_get_status, int (*)(fluid_player_t*)); diff --git a/dynamic_fluidsynth.h b/dynamic_fluidsynth.h index 5d25232..c20abe2 100644 --- a/dynamic_fluidsynth.h +++ b/dynamic_fluidsynth.h @@ -30,9 +30,14 @@ typedef struct { int loaded; void *handle; +#if (FLUIDSYNTH_VERSION_MAJOR >= 2) + void (*delete_fluid_player)(fluid_player_t*); + void (*delete_fluid_synth)(fluid_synth_t*); +#else int (*delete_fluid_player)(fluid_player_t*); - void (*delete_fluid_settings)(fluid_settings_t*); int (*delete_fluid_synth)(fluid_synth_t*); +#endif + void (*delete_fluid_settings)(fluid_settings_t*); int (*fluid_player_add)(fluid_player_t*, const char*); int (*fluid_player_add_mem)(fluid_player_t*, const void*, size_t); int (*fluid_player_get_status)(fluid_player_t*);