mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-07-30 11:35:30 +02:00
Update fluidsynth settings to 3.0's API
This commit is contained in:
parent
d6325abedb
commit
b0a64cd43e
3 changed files with 7 additions and 5 deletions
|
@ -7,11 +7,11 @@
|
|||
#include "debugwriter.h"
|
||||
|
||||
#if __LINUX__ || __ANDROID__
|
||||
#define FLUID_LIB "libfluidsynth.so.1"
|
||||
#define FLUID_LIB "libfluidsynth.so.3"
|
||||
#elif MKXPZ_BUILD_XCODE
|
||||
#define FLUID_LIB "@rpath/libfluidsynth.dylib"
|
||||
#elif __MACOSX__
|
||||
#define FLUID_LIB "libfluidsynth.1.dylib"
|
||||
#define FLUID_LIB "libfluidsynth.3.dylib"
|
||||
#elif __WINDOWS__
|
||||
#define FLUID_LIB "fluidsynth.dll"
|
||||
#else
|
||||
|
|
|
@ -4,13 +4,14 @@
|
|||
#ifdef SHARED_FLUID
|
||||
# include <fluidsynth.h>
|
||||
#else
|
||||
# define FLUIDSYNTH_VERSION_MAJOR 2
|
||||
# define FLUIDSYNTH_VERSION_MAJOR 3
|
||||
#endif
|
||||
|
||||
typedef struct _fluid_hashtable_t fluid_settings_t;
|
||||
typedef struct _fluid_synth_t fluid_synth_t;
|
||||
|
||||
typedef int (*FLUIDSETTINGSSETNUMPROC)(fluid_settings_t* settings, const char *name, double val);
|
||||
typedef int (*FLUIDSETTINGSSETINTPROC)(fluid_settings_t* settings, const char *name, int val);
|
||||
typedef int (*FLUIDSETTINGSSETSTRPROC)(fluid_settings_t* settings, const char *name, const char *str);
|
||||
typedef int (*FLUIDSYNTHSFLOADPROC)(fluid_synth_t* synth, const char* filename, int reset_presets);
|
||||
typedef int (*FLUIDSYNTHSYSTEMRESETPROC)(fluid_synth_t* synth);
|
||||
|
@ -34,6 +35,7 @@ typedef void (*DELETEFLUIDSYNTHPROC)(fluid_synth_t* synth);
|
|||
|
||||
#define FLUID_FUNCS \
|
||||
FLUID_FUN(settings_setnum, FLUIDSETTINGSSETNUMPROC) \
|
||||
FLUID_FUN(settings_setint, FLUIDSETTINGSSETINTPROC) \
|
||||
FLUID_FUN(settings_setstr, FLUIDSETTINGSSETSTRPROC) \
|
||||
FLUID_FUN(synth_sfload, FLUIDSYNTHSFLOADPROC) \
|
||||
FLUID_FUN(synth_system_reset, FLUIDSYNTHSYSTEMRESETPROC) \
|
||||
|
|
|
@ -82,8 +82,8 @@ struct SharedMidiState
|
|||
flSettings = fluid.new_settings();
|
||||
fluid.settings_setnum(flSettings, "synth.gain", 1.0f);
|
||||
fluid.settings_setnum(flSettings, "synth.sample-rate", SYNTH_SAMPLERATE);
|
||||
fluid.settings_setstr(flSettings, "synth.chorus.active", conf.midi.chorus ? "yes" : "no");
|
||||
fluid.settings_setstr(flSettings, "synth.reverb.active", conf.midi.reverb ? "yes" : "no");
|
||||
fluid.settings_setint(flSettings, "synth.chorus.active", conf.midi.chorus);
|
||||
fluid.settings_setint(flSettings, "synth.reverb.active", conf.midi.reverb);
|
||||
|
||||
for (size_t i = 0; i < SYNTH_INIT_COUNT; ++i)
|
||||
addSynth(false);
|
||||
|
|
Loading…
Add table
Reference in a new issue