2018-10-17 18:41:02 -04:00
|
|
|
diff --git b/libs/fluidsynth/fluidsynth/synth.h a/libs/fluidsynth/fluidsynth/synth.h
|
2018-11-23 08:36:52 -05:00
|
|
|
index 369a2c261..87826809f 100644
|
2018-10-17 18:41:02 -04:00
|
|
|
--- b/libs/fluidsynth/fluidsynth/synth.h
|
|
|
|
+++ a/libs/fluidsynth/fluidsynth/synth.h
|
2018-11-23 08:36:52 -05:00
|
|
|
@@ -233,7 +233,7 @@ FLUIDSYNTH_API int fluid_synth_tuning_dump(fluid_synth_t *synth, int bank, int p
|
|
|
|
/* Misc */
|
|
|
|
|
|
|
|
FLUIDSYNTH_API double fluid_synth_get_cpu_load(fluid_synth_t *synth);
|
|
|
|
-FLUID_DEPRECATED FLUIDSYNTH_API const char *fluid_synth_error(fluid_synth_t *synth);
|
|
|
|
+const char *fluid_synth_error(fluid_synth_t *synth);
|
|
|
|
|
|
|
|
|
|
|
|
/* Default modulators */
|
2018-10-17 18:41:02 -04:00
|
|
|
@@ -265,7 +265,7 @@ FLUIDSYNTH_API int fluid_synth_write_s16(fluid_synth_t *synth, int len,
|
|
|
|
FLUIDSYNTH_API int fluid_synth_write_float(fluid_synth_t *synth, int len,
|
|
|
|
void *lout, int loff, int lincr,
|
|
|
|
void *rout, int roff, int rincr);
|
|
|
|
-FLUID_DEPRECATED FLUIDSYNTH_API int fluid_synth_nwrite_float(fluid_synth_t *synth, int len,
|
|
|
|
+FLUIDSYNTH_API int fluid_synth_nwrite_float(fluid_synth_t *synth, int len,
|
|
|
|
float **left, float **right,
|
|
|
|
float **fx_left, float **fx_right);
|
|
|
|
FLUIDSYNTH_API int fluid_synth_process(fluid_synth_t *synth, int len,
|
|
|
|
@@ -310,7 +310,9 @@ FLUIDSYNTH_API int fluid_synth_set_custom_filter(fluid_synth_t *, int type, int
|
|
|
|
|
|
|
|
/* LADSPA */
|
|
|
|
|
|
|
|
+#ifdef LADSPA
|
|
|
|
FLUIDSYNTH_API fluid_ladspa_fx_t *fluid_synth_get_ladspa_fx(fluid_synth_t *synth);
|
|
|
|
+#endif
|
2016-08-23 12:50:54 -04:00
|
|
|
|
2018-10-17 18:41:02 -04:00
|
|
|
|
|
|
|
/* API: Poly mono mode */
|
|
|
|
diff --git b/libs/fluidsynth/fluidsynth/types.h a/libs/fluidsynth/fluidsynth/types.h
|
|
|
|
index 47ef18336..5ad29281a 100644
|
|
|
|
--- b/libs/fluidsynth/fluidsynth/types.h
|
|
|
|
+++ a/libs/fluidsynth/fluidsynth/types.h
|
|
|
|
@@ -56,7 +56,9 @@ typedef struct _fluid_sequencer_t fluid_sequencer_t; /**< Sequencer i
|
|
|
|
typedef struct _fluid_ramsfont_t fluid_ramsfont_t; /**< RAM SoundFont */
|
|
|
|
typedef struct _fluid_rampreset_t fluid_rampreset_t; /**< RAM SoundFont preset */
|
|
|
|
typedef struct _fluid_cmd_handler_t fluid_cmd_handler_t; /**< Shell Command Handler */
|
|
|
|
+#ifdef LADSPA
|
|
|
|
typedef struct _fluid_ladspa_fx_t fluid_ladspa_fx_t; /**< LADSPA effects instance */
|
2016-08-23 12:50:54 -04:00
|
|
|
+#endif
|
2018-10-17 18:41:02 -04:00
|
|
|
typedef struct _fluid_file_callbacks_t fluid_file_callbacks_t; /**< Callback struct to perform custom file loading of soundfonts */
|
2016-08-23 12:50:54 -04:00
|
|
|
|
2018-10-17 18:41:02 -04:00
|
|
|
typedef int fluid_istream_t; /**< Input stream descriptor */
|
2018-11-23 08:36:52 -05:00
|
|
|
diff --git b/libs/fluidsynth/src/fluid_conv.h a/libs/fluidsynth/src/fluid_conv.h
|
|
|
|
index 60f441c49..e6455186e 100644
|
|
|
|
--- b/libs/fluidsynth/src/fluid_conv.h
|
|
|
|
+++ a/libs/fluidsynth/src/fluid_conv.h
|
|
|
|
@@ -22,7 +22,7 @@
|
|
|
|
#define _FLUID_CONV_H
|
|
|
|
|
|
|
|
#include "fluidsynth_priv.h"
|
|
|
|
-#include "utils/fluid_conv_tables.h"
|
|
|
|
+#include "fluid_conv_tables.h"
|
|
|
|
|
|
|
|
fluid_real_t fluid_ct2hz_real(fluid_real_t cents);
|
|
|
|
fluid_real_t fluid_ct2hz(fluid_real_t cents);
|
2016-08-24 07:04:03 -04:00
|
|
|
diff --git b/libs/fluidsynth/src/fluid_hash.c a/libs/fluidsynth/src/fluid_hash.c
|
2018-10-17 18:41:02 -04:00
|
|
|
index 37b0a06a4..b6586895b 100644
|
2016-08-24 07:04:03 -04:00
|
|
|
--- b/libs/fluidsynth/src/fluid_hash.c
|
|
|
|
+++ a/libs/fluidsynth/src/fluid_hash.c
|
2018-10-17 18:41:02 -04:00
|
|
|
@@ -991,6 +991,7 @@ fluid_hashtable_remove_all(fluid_hashtable_t *hashtable)
|
|
|
|
fluid_hashtable_maybe_resize(hashtable);
|
2016-08-23 12:50:54 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
+#if 0
|
|
|
|
/**
|
2018-10-17 18:41:02 -04:00
|
|
|
* fluid_hashtable_steal_all:
|
2016-08-23 12:50:54 -04:00
|
|
|
* @hashtable: a #fluid_hashtable_t.
|
2018-10-17 18:41:02 -04:00
|
|
|
@@ -1008,6 +1009,7 @@ fluid_hashtable_steal_all(fluid_hashtable_t *hashtable)
|
|
|
|
fluid_hashtable_remove_all_nodes(hashtable, FALSE);
|
|
|
|
fluid_hashtable_maybe_resize(hashtable);
|
2016-08-23 12:50:54 -04:00
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
2018-10-17 18:41:02 -04:00
|
|
|
/*
|
|
|
|
* fluid_hashtable_foreach_remove_or_steal:
|
2016-08-24 07:04:03 -04:00
|
|
|
diff --git b/libs/fluidsynth/src/fluid_midi.c a/libs/fluidsynth/src/fluid_midi.c
|
2019-01-02 09:33:23 -05:00
|
|
|
index 1a394f811..8deb0b0d1 100644
|
2016-08-24 07:04:03 -04:00
|
|
|
--- b/libs/fluidsynth/src/fluid_midi.c
|
|
|
|
+++ a/libs/fluidsynth/src/fluid_midi.c
|
2019-01-02 09:33:23 -05:00
|
|
|
@@ -76,7 +76,7 @@ static int fluid_midi_file_read_tracklen(fluid_midi_file *mf);
|
2018-10-17 18:41:02 -04:00
|
|
|
static int fluid_midi_file_eot(fluid_midi_file *mf);
|
|
|
|
static int fluid_midi_file_get_division(fluid_midi_file *midifile);
|
2016-08-24 07:04:03 -04:00
|
|
|
|
|
|
|
-
|
|
|
|
+#if 0 // disable file I/O with Ardour
|
|
|
|
/***************************************************************
|
|
|
|
*
|
|
|
|
* MIDIFILE
|
2019-01-02 09:33:23 -05:00
|
|
|
@@ -1047,6 +1047,7 @@ fluid_midi_file_get_division(fluid_midi_file *midifile)
|
2016-08-24 07:04:03 -04:00
|
|
|
{
|
|
|
|
return midifile->division;
|
2016-08-23 12:50:54 -04:00
|
|
|
}
|
2016-08-24 07:04:03 -04:00
|
|
|
+#endif
|
2016-08-23 12:50:54 -04:00
|
|
|
|
2016-08-24 07:04:03 -04:00
|
|
|
/******************************************************
|
|
|
|
*
|
2019-01-02 09:33:23 -05:00
|
|
|
@@ -1413,7 +1414,7 @@ static void fluid_midi_event_get_sysex_LOCAL(fluid_midi_event_t *evt, void **dat
|
2016-08-24 07:04:03 -04:00
|
|
|
*
|
|
|
|
* fluid_track_t
|
|
|
|
*/
|
|
|
|
-
|
|
|
|
+#if 0 // disable fluid file player in Ardour
|
|
|
|
/*
|
|
|
|
* new_fluid_track
|
|
|
|
*/
|
2019-01-02 09:33:23 -05:00
|
|
|
@@ -2517,3 +2518,4 @@ fluid_midi_event_length(unsigned char event)
|
2016-08-23 12:50:54 -04:00
|
|
|
|
2016-08-24 07:04:03 -04:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
+#endif
|
2019-01-02 09:33:23 -05:00
|
|
|
diff --git b/libs/fluidsynth/src/fluid_mod.c a/libs/fluidsynth/src/fluid_mod.c
|
|
|
|
index 84e97731e..5e57455d4 100644
|
|
|
|
--- b/libs/fluidsynth/src/fluid_mod.c
|
|
|
|
+++ a/libs/fluidsynth/src/fluid_mod.c
|
|
|
|
@@ -603,7 +603,7 @@ fluid_mod_check_cc_source(const fluid_mod_t *mod, unsigned char src1_select)
|
|
|
|
* @param name,if not NULL, pointer on a string displayed as a warning.
|
|
|
|
* @return TRUE if modulator sources src1, src2 are valid, FALSE otherwise.
|
|
|
|
*/
|
|
|
|
-int fluid_mod_check_sources(const fluid_mod_t *mod, char *name)
|
|
|
|
+int fluid_mod_check_sources(const fluid_mod_t *mod, const char *name)
|
2016-08-23 12:50:54 -04:00
|
|
|
{
|
2019-01-02 09:33:23 -05:00
|
|
|
static const char *invalid_non_cc_src =
|
|
|
|
"Invalid modulator, using non-CC source %s.src%d=%d";
|
|
|
|
diff --git b/libs/fluidsynth/src/fluid_mod.h a/libs/fluidsynth/src/fluid_mod.h
|
|
|
|
index 3e7661741..ec8e967a3 100644
|
|
|
|
--- b/libs/fluidsynth/src/fluid_mod.h
|
|
|
|
+++ a/libs/fluidsynth/src/fluid_mod.h
|
|
|
|
@@ -44,7 +44,7 @@ struct _fluid_mod_t
|
|
|
|
};
|
2016-08-23 12:50:54 -04:00
|
|
|
|
2019-01-02 09:33:23 -05:00
|
|
|
fluid_real_t fluid_mod_get_value(fluid_mod_t *mod, fluid_voice_t *voice);
|
|
|
|
-int fluid_mod_check_sources(const fluid_mod_t *mod, char *name);
|
|
|
|
+int fluid_mod_check_sources(const fluid_mod_t *mod, const char *name);
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
void fluid_dump_modulator(fluid_mod_t *mod);
|
2016-08-24 07:04:03 -04:00
|
|
|
diff --git b/libs/fluidsynth/src/fluid_rvoice_mixer.c a/libs/fluidsynth/src/fluid_rvoice_mixer.c
|
2019-01-02 09:33:23 -05:00
|
|
|
index af0ef75d1..9acc5f830 100644
|
2016-08-24 07:04:03 -04:00
|
|
|
--- b/libs/fluidsynth/src/fluid_rvoice_mixer.c
|
|
|
|
+++ a/libs/fluidsynth/src/fluid_rvoice_mixer.c
|
2018-11-23 08:36:52 -05:00
|
|
|
@@ -24,7 +24,6 @@
|
2016-08-23 12:50:54 -04:00
|
|
|
#include "fluid_rev.h"
|
|
|
|
#include "fluid_chorus.h"
|
|
|
|
#include "fluidsynth_priv.h"
|
|
|
|
-#include "fluid_ladspa.h"
|
2018-10-17 18:41:02 -04:00
|
|
|
#include "fluid_synth.h"
|
2016-08-24 07:04:03 -04:00
|
|
|
|
|
|
|
|
|
|
|
diff --git b/libs/fluidsynth/src/fluid_rvoice_mixer.h a/libs/fluidsynth/src/fluid_rvoice_mixer.h
|
2018-10-17 18:41:02 -04:00
|
|
|
index 4ee072e4b..1b3fceb34 100644
|
2016-08-24 07:04:03 -04:00
|
|
|
--- b/libs/fluidsynth/src/fluid_rvoice_mixer.h
|
|
|
|
+++ a/libs/fluidsynth/src/fluid_rvoice_mixer.h
|
2018-10-17 18:41:02 -04:00
|
|
|
@@ -24,7 +24,6 @@
|
2016-08-23 12:50:54 -04:00
|
|
|
|
|
|
|
#include "fluidsynth_priv.h"
|
|
|
|
#include "fluid_rvoice.h"
|
|
|
|
-#include "fluid_ladspa.h"
|
|
|
|
|
|
|
|
typedef struct _fluid_rvoice_mixer_t fluid_rvoice_mixer_t;
|
|
|
|
|
2016-08-24 07:04:03 -04:00
|
|
|
diff --git b/libs/fluidsynth/src/fluid_settings.c a/libs/fluidsynth/src/fluid_settings.c
|
2018-11-23 08:36:52 -05:00
|
|
|
index 02be9a033..9207ab063 100644
|
2016-08-24 07:04:03 -04:00
|
|
|
--- b/libs/fluidsynth/src/fluid_settings.c
|
|
|
|
+++ a/libs/fluidsynth/src/fluid_settings.c
|
2018-10-17 18:41:02 -04:00
|
|
|
@@ -21,9 +21,6 @@
|
2016-08-23 12:50:54 -04:00
|
|
|
#include "fluid_sys.h"
|
|
|
|
#include "fluid_hash.h"
|
|
|
|
#include "fluid_synth.h"
|
|
|
|
-#include "fluid_cmd.h"
|
|
|
|
-#include "fluid_adriver.h"
|
|
|
|
-#include "fluid_mdriver.h"
|
|
|
|
#include "fluid_settings.h"
|
|
|
|
#include "fluid_midi.h"
|
|
|
|
|
2018-10-17 18:41:02 -04:00
|
|
|
@@ -328,11 +325,13 @@ fluid_settings_init(fluid_settings_t *settings)
|
|
|
|
fluid_return_if_fail(settings != NULL);
|
2016-08-23 12:50:54 -04:00
|
|
|
|
2018-10-17 18:41:02 -04:00
|
|
|
fluid_synth_settings(settings);
|
2016-08-23 12:50:54 -04:00
|
|
|
+#if 0
|
2018-10-17 18:41:02 -04:00
|
|
|
fluid_shell_settings(settings);
|
|
|
|
fluid_player_settings(settings);
|
|
|
|
fluid_file_renderer_settings(settings);
|
|
|
|
fluid_audio_driver_settings(settings);
|
|
|
|
fluid_midi_driver_settings(settings);
|
2016-08-23 12:50:54 -04:00
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
2016-08-24 07:04:03 -04:00
|
|
|
diff --git b/libs/fluidsynth/src/fluid_synth.c a/libs/fluidsynth/src/fluid_synth.c
|
2019-01-02 09:33:23 -05:00
|
|
|
index 07bfc0427..b4524a2ac 100644
|
2016-08-24 07:04:03 -04:00
|
|
|
--- b/libs/fluidsynth/src/fluid_synth.c
|
|
|
|
+++ a/libs/fluidsynth/src/fluid_synth.c
|
2018-10-17 18:41:02 -04:00
|
|
|
@@ -267,7 +267,7 @@ void fluid_version(int *major, int *minor, int *micro)
|
|
|
|
* @return FluidSynth version string, which is internal and should not be
|
|
|
|
* modified or freed.
|
2016-08-23 12:50:54 -04:00
|
|
|
*/
|
2018-10-17 18:41:02 -04:00
|
|
|
-char *
|
|
|
|
+const char *
|
|
|
|
fluid_version_str(void)
|
2016-08-23 12:50:54 -04:00
|
|
|
{
|
2018-10-17 18:41:02 -04:00
|
|
|
return FLUIDSYNTH_VERSION;
|
2019-01-02 09:33:23 -05:00
|
|
|
@@ -6442,6 +6442,7 @@ int fluid_synth_set_channel_type(fluid_synth_t *synth, int chan, int type)
|
2018-10-17 18:41:02 -04:00
|
|
|
FLUID_API_RETURN(FLUID_OK);
|
|
|
|
}
|
|
|
|
|
|
|
|
+#ifdef LADSPA
|
|
|
|
/**
|
|
|
|
* Return the LADSPA effects instance used by FluidSynth
|
|
|
|
*
|
2019-01-02 09:33:23 -05:00
|
|
|
@@ -6454,6 +6455,7 @@ fluid_ladspa_fx_t *fluid_synth_get_ladspa_fx(fluid_synth_t *synth)
|
2018-10-17 18:41:02 -04:00
|
|
|
|
|
|
|
return synth->ladspa_fx;
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Configure a general-purpose IIR biquad filter.
|
2016-08-24 07:04:03 -04:00
|
|
|
diff --git b/libs/fluidsynth/src/fluid_synth.h a/libs/fluidsynth/src/fluid_synth.h
|
2018-11-23 08:36:52 -05:00
|
|
|
index 156424af1..58869730c 100644
|
2016-08-24 07:04:03 -04:00
|
|
|
--- b/libs/fluidsynth/src/fluid_synth.h
|
|
|
|
+++ a/libs/fluidsynth/src/fluid_synth.h
|
2018-10-17 18:41:02 -04:00
|
|
|
@@ -33,8 +33,6 @@
|
2016-08-23 12:50:54 -04:00
|
|
|
#include "fluid_rev.h"
|
|
|
|
#include "fluid_voice.h"
|
|
|
|
#include "fluid_chorus.h"
|
|
|
|
-#include "fluid_ladspa.h"
|
|
|
|
-#include "fluid_midi_router.h"
|
|
|
|
#include "fluid_rvoice_event.h"
|
|
|
|
|
2018-10-17 18:41:02 -04:00
|
|
|
/***************************************************************
|
|
|
|
@@ -165,7 +163,9 @@ struct _fluid_synth_t
|
|
|
|
|
|
|
|
fluid_mod_t *default_mod; /**< the (dynamic) list of default modulators */
|
|
|
|
|
|
|
|
+#ifdef LADSPA
|
|
|
|
fluid_ladspa_fx_t *ladspa_fx; /**< Effects unit for LADSPA support */
|
|
|
|
+#endif
|
|
|
|
enum fluid_iir_filter_type custom_filter_type; /**< filter type of the user-defined filter currently used for all voices */
|
|
|
|
enum fluid_iir_filter_flags custom_filter_flags; /**< filter type of the user-defined filter currently used for all voices */
|
|
|
|
};
|
2016-08-24 07:04:03 -04:00
|
|
|
diff --git b/libs/fluidsynth/src/fluid_sys.c a/libs/fluidsynth/src/fluid_sys.c
|
2019-01-02 09:33:23 -05:00
|
|
|
index d686737f6..28911ee7f 100644
|
2016-08-24 07:04:03 -04:00
|
|
|
--- b/libs/fluidsynth/src/fluid_sys.c
|
|
|
|
+++ a/libs/fluidsynth/src/fluid_sys.c
|
2018-10-17 18:41:02 -04:00
|
|
|
@@ -202,9 +202,10 @@ fluid_log(int level, const char *fmt, ...)
|
|
|
|
* @param delim String of delimiter chars.
|
|
|
|
* @return Pointer to the next token or NULL if no more tokens.
|
|
|
|
*/
|
|
|
|
-char *fluid_strtok(char **str, char *delim)
|
|
|
|
+char *fluid_strtok(char **str, const char *delim)
|
2016-08-24 07:04:03 -04:00
|
|
|
{
|
2018-10-17 18:41:02 -04:00
|
|
|
- char *s, *d, *token;
|
|
|
|
+ char *s, *token;
|
|
|
|
+ const char *d;
|
|
|
|
char c;
|
|
|
|
|
|
|
|
if(str == NULL || delim == NULL || !*delim)
|
|
|
|
diff --git b/libs/fluidsynth/src/fluid_sys.h a/libs/fluidsynth/src/fluid_sys.h
|
2019-01-02 09:33:23 -05:00
|
|
|
index 72b323029..122938655 100644
|
2018-10-17 18:41:02 -04:00
|
|
|
--- b/libs/fluidsynth/src/fluid_sys.h
|
|
|
|
+++ a/libs/fluidsynth/src/fluid_sys.h
|
2019-01-02 09:33:23 -05:00
|
|
|
@@ -99,7 +99,7 @@ else \
|
2018-10-17 18:41:02 -04:00
|
|
|
/*
|
|
|
|
* Utility functions
|
|
|
|
*/
|
|
|
|
-char *fluid_strtok(char **str, char *delim);
|
|
|
|
+char *fluid_strtok(char **str, const char *delim);
|
2016-08-24 07:04:03 -04:00
|
|
|
|
2016-08-23 12:50:54 -04:00
|
|
|
|
2018-10-17 18:41:02 -04:00
|
|
|
#if defined(__OS2__)
|
2016-08-24 07:04:03 -04:00
|
|
|
diff --git b/libs/fluidsynth/src/fluidsynth_priv.h a/libs/fluidsynth/src/fluidsynth_priv.h
|
2019-01-02 09:33:23 -05:00
|
|
|
index 4df590e21..384785fcc 100644
|
2016-08-24 07:04:03 -04:00
|
|
|
--- b/libs/fluidsynth/src/fluidsynth_priv.h
|
|
|
|
+++ a/libs/fluidsynth/src/fluidsynth_priv.h
|
2018-10-17 18:41:02 -04:00
|
|
|
@@ -26,10 +26,6 @@
|
|
|
|
|
2016-08-23 12:50:54 -04:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
-#if defined(__POWERPC__) && !(defined(__APPLE__) && defined(__MACH__))
|
|
|
|
-#include "config_maxmsp43.h"
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
#if HAVE_STRING_H
|
|
|
|
#include <string.h>
|
|
|
|
#endif
|
2018-10-17 18:41:02 -04:00
|
|
|
@@ -133,8 +129,9 @@ typedef guint64 uint64_t;
|
2016-08-25 16:37:12 -04:00
|
|
|
#endif
|
|
|
|
|
2018-10-17 18:41:02 -04:00
|
|
|
#if defined(WIN32) && HAVE_WINDOWS_H
|
2016-08-25 16:37:12 -04:00
|
|
|
-#include <winsock2.h>
|
2018-10-17 18:41:02 -04:00
|
|
|
-#include <ws2tcpip.h> /* Provides also socklen_t */
|
|
|
|
+//#include <winsock2.h>
|
|
|
|
+//#include <ws2tcpip.h> /* Provides also socklen_t */
|
|
|
|
+#include <windows.h>
|
2016-08-28 07:47:12 -04:00
|
|
|
|
2018-10-17 18:41:02 -04:00
|
|
|
/* WIN32 special defines */
|
2018-11-23 08:36:52 -05:00
|
|
|
#define STDIN_FILENO 0
|