New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FluidSynth] Provide support for FluidSynth 2.x #26
Labels
Comments
|
A little patch given by StefG: ~/extsvn/SDL-Mixer-X.git/trunk/src/codecs $svn diff
Index: music_fluidsynth.c
===================================================================
--- music_fluidsynth.c (révision 242)
+++ music_fluidsynth.c (copie de travail)
@@ -32,14 +32,19 @@
#include <fluidsynth.h>
+#if FLUIDSYNTH_VERSION_MAJOR >= 2
+ #define DELETE_RETURNTYPE void
+#else
+ #define DELETE_RETURNTYPE int
+#endif
typedef struct {
int loaded;
void *handle;
- int (*delete_fluid_player)(fluid_player_t*);
+ DELETE_RETURNTYPE (*delete_fluid_player)(fluid_player_t*);
void (*delete_fluid_settings)(fluid_settings_t*);
- int (*delete_fluid_synth)(fluid_synth_t*);
+ DELETE_RETURNTYPE (*delete_fluid_synth)(fluid_synth_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*);
@@ -78,9 +83,9 @@
return -1;
}
#endif
- FUNCTION_LOADER(delete_fluid_player, int (*)(fluid_player_t*))
+ FUNCTION_LOADER(delete_fluid_player, DELETE_RETURNTYPE (*)(fluid_player_t*))
FUNCTION_LOADER(delete_fluid_settings, void (*)(fluid_settings_t*))
- FUNCTION_LOADER(delete_fluid_synth, int (*)(fluid_synth_t*))
+ FUNCTION_LOADER(delete_fluid_synth, DELETE_RETURNTYPE (*)(fluid_synth_t*))
FUNCTION_LOADER(fluid_player_add, int (*)(fluid_player_t*, const char*))
FUNCTION_LOADER(fluid_player_add_mem, int (*)(fluid_player_t*, const void*, size_t))
FUNCTION_LOADER(fluid_player_get_status, int (*)(fluid_player_t*)) |
Wohlstand
added a commit
that referenced
this issue
Jan 10, 2019
|
Patch has been applied! |
|
Tested and confirmed by reporter! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FluidSynth 1 and 2 are not compatible:
It's need to provide the dual support of both FS 1 and 2 with accurate identification of each FluidSynth version.
The text was updated successfully, but these errors were encountered: