13
0

update fluidsynth patch

This commit is contained in:
Robin Gareus 2016-08-24 13:04:03 +02:00
parent f5602adfe8
commit bd4424a74e

View File

@ -1,7 +1,7 @@
diff --git a/libs/fluidsynth/src/fluid_defsfont.c b/libs/fluidsynth/src/fluid_defsfont.c
diff --git b/libs/fluidsynth/src/fluid_defsfont.c a/libs/fluidsynth/src/fluid_defsfont.c
index 3eea95c..c395218 100644
--- a/libs/fluidsynth/src/fluid_defsfont.c
+++ b/libs/fluidsynth/src/fluid_defsfont.c
--- b/libs/fluidsynth/src/fluid_defsfont.c
+++ a/libs/fluidsynth/src/fluid_defsfont.c
@@ -109,11 +109,13 @@ char* fluid_defsfont_sfont_get_name(fluid_sfont_t* sfont)
return fluid_defsfont_get_name((fluid_defsfont_t*) sfont->data);
}
@ -16,10 +16,10 @@ index 3eea95c..c395218 100644
fluid_preset_t*
fluid_defsfont_sfont_get_preset(fluid_sfont_t* sfont, unsigned int bank, unsigned int prenum)
diff --git a/libs/fluidsynth/src/fluid_hash.c b/libs/fluidsynth/src/fluid_hash.c
diff --git b/libs/fluidsynth/src/fluid_hash.c a/libs/fluidsynth/src/fluid_hash.c
index a063e29..9d5a920 100644
--- a/libs/fluidsynth/src/fluid_hash.c
+++ b/libs/fluidsynth/src/fluid_hash.c
--- b/libs/fluidsynth/src/fluid_hash.c
+++ a/libs/fluidsynth/src/fluid_hash.c
@@ -93,7 +93,7 @@ static const guint primes[] =
static const unsigned int nprimes = sizeof (primes) / sizeof (primes[0]);
@ -54,15 +54,37 @@ index a063e29..9d5a920 100644
/**
* fluid_hashtable_foreach_steal:
diff --git a/libs/fluidsynth/src/fluid_midi.c b/libs/fluidsynth/src/fluid_midi.c
index 5ceab01..1ee3dd2 100644
--- a/libs/fluidsynth/src/fluid_midi.c
+++ b/libs/fluidsynth/src/fluid_midi.c
@@ -1115,10 +1115,11 @@ fluid_track_get_duration(fluid_track_t *track)
return time;
}
diff --git b/libs/fluidsynth/src/fluid_midi.c a/libs/fluidsynth/src/fluid_midi.c
index 5ceab01..171952f 100644
--- b/libs/fluidsynth/src/fluid_midi.c
+++ a/libs/fluidsynth/src/fluid_midi.c
@@ -34,7 +34,7 @@ static int fluid_midi_event_length(unsigned char event);
static char* fluid_file_read_full(fluid_file fp, size_t* length);
#define READ_FULL_INITIAL_BUFLEN 1024
+#if 0
-
+#if 0 // disable file I/O with Ardour
/***************************************************************
*
* MIDIFILE
@@ -760,6 +760,7 @@ fluid_midi_file_get_division(fluid_midi_file *midifile)
{
return midifile->division;
}
+#endif
/******************************************************
*
@@ -1030,7 +1031,7 @@ fluid_midi_event_set_sysex(fluid_midi_event_t *evt, void *data, int size, int dy
*
* fluid_track_t
*/
-
+#if 0 // disable fluid file player in Ardour
/*
* new_fluid_track
*/
@@ -1118,7 +1119,7 @@ fluid_track_get_duration(fluid_track_t *track)
/*
* fluid_track_count_events
*/
@ -71,15 +93,7 @@ index 5ceab01..1ee3dd2 100644
fluid_track_count_events(fluid_track_t *track, int *on, int *off)
{
fluid_midi_event_t *evt = track->first;
@@ -1132,6 +1133,7 @@ fluid_track_count_events(fluid_track_t *track, int *on, int *off)
}
return FLUID_OK;
}
+#endif
/*
* fluid_track_add_event
@@ -1533,7 +1535,7 @@ fluid_player_load(fluid_player_t *player, fluid_playlist_item *item)
@@ -1533,7 +1534,7 @@ fluid_player_load(fluid_player_t *player, fluid_playlist_item *item)
return FLUID_OK;
}
@ -88,7 +102,7 @@ index 5ceab01..1ee3dd2 100644
fluid_player_advancefile(fluid_player_t *player)
{
if (player->playlist == NULL) {
@@ -1553,7 +1555,7 @@ fluid_player_advancefile(fluid_player_t *player)
@@ -1553,7 +1554,7 @@ fluid_player_advancefile(fluid_player_t *player)
}
}
@ -97,10 +111,15 @@ index 5ceab01..1ee3dd2 100644
fluid_player_playlist_load(fluid_player_t *player, unsigned int msec)
{
fluid_playlist_item* current_playitem;
diff --git a/libs/fluidsynth/src/fluid_rev.c b/libs/fluidsynth/src/fluid_rev.c
@@ -1938,3 +1939,4 @@ fluid_midi_event_length(unsigned char event)
}
return 1;
}
+#endif
diff --git b/libs/fluidsynth/src/fluid_rev.c a/libs/fluidsynth/src/fluid_rev.c
index 51b0e79..166007d 100644
--- a/libs/fluidsynth/src/fluid_rev.c
+++ b/libs/fluidsynth/src/fluid_rev.c
--- b/libs/fluidsynth/src/fluid_rev.c
+++ a/libs/fluidsynth/src/fluid_rev.c
@@ -75,7 +75,7 @@ void fluid_allpass_init(fluid_allpass* allpass);
void fluid_allpass_setfeedback(fluid_allpass* allpass, fluid_real_t val);
fluid_real_t fluid_allpass_getfeedback(fluid_allpass* allpass);
@ -119,11 +138,11 @@ index 51b0e79..166007d 100644
fluid_allpass_release(fluid_allpass* allpass)
{
FLUID_FREE(allpass->buffer);
diff --git a/libs/fluidsynth/src/fluid_rvoice_mixer.c b/libs/fluidsynth/src/fluid_rvoice_mixer.c
index 4672cb8..cc633f5 100644
--- a/libs/fluidsynth/src/fluid_rvoice_mixer.c
+++ b/libs/fluidsynth/src/fluid_rvoice_mixer.c
@@ -24,7 +24,7 @@
diff --git b/libs/fluidsynth/src/fluid_rvoice_mixer.c a/libs/fluidsynth/src/fluid_rvoice_mixer.c
index 4672cb8..d5369aa 100644
--- b/libs/fluidsynth/src/fluid_rvoice_mixer.c
+++ a/libs/fluidsynth/src/fluid_rvoice_mixer.c
@@ -24,12 +24,12 @@
#include "fluid_rev.h"
#include "fluid_chorus.h"
#include "fluidsynth_priv.h"
@ -132,10 +151,16 @@ index 4672cb8..cc633f5 100644
#define SYNTH_REVERB_CHANNEL 0
#define SYNTH_CHORUS_CHANNEL 1
diff --git a/libs/fluidsynth/src/fluid_rvoice_mixer.h b/libs/fluidsynth/src/fluid_rvoice_mixer.h
-#define ENABLE_MIXER_THREADS 1
+#undef ENABLE_MIXER_THREADS // Ardour does the multithreading -- synth.cpu-cores defaults to 1
// If less than x voices, the thread overhead is larger than the gain,
// so don't activate the thread(s).
diff --git b/libs/fluidsynth/src/fluid_rvoice_mixer.h a/libs/fluidsynth/src/fluid_rvoice_mixer.h
index eeb49ec..d4e41ca 100644
--- a/libs/fluidsynth/src/fluid_rvoice_mixer.h
+++ b/libs/fluidsynth/src/fluid_rvoice_mixer.h
--- b/libs/fluidsynth/src/fluid_rvoice_mixer.h
+++ a/libs/fluidsynth/src/fluid_rvoice_mixer.h
@@ -24,7 +24,7 @@
#include "fluidsynth_priv.h"
@ -145,10 +170,10 @@ index eeb49ec..d4e41ca 100644
typedef struct _fluid_rvoice_mixer_t fluid_rvoice_mixer_t;
diff --git a/libs/fluidsynth/src/fluid_settings.c b/libs/fluidsynth/src/fluid_settings.c
index 78725fb..2061c90 100644
--- a/libs/fluidsynth/src/fluid_settings.c
+++ b/libs/fluidsynth/src/fluid_settings.c
diff --git b/libs/fluidsynth/src/fluid_settings.c a/libs/fluidsynth/src/fluid_settings.c
index 78725fb..56de8c7 100644
--- b/libs/fluidsynth/src/fluid_settings.c
+++ a/libs/fluidsynth/src/fluid_settings.c
@@ -22,9 +22,9 @@
#include "fluid_sys.h"
#include "fluid_hash.h"
@ -166,10 +191,9 @@ index 78725fb..2061c90 100644
fluid_return_if_fail (settings != NULL);
fluid_synth_settings(settings);
- fluid_shell_settings(settings);
+ //fluid_shell_settings(settings);
fluid_player_settings(settings);
+#if 0
fluid_shell_settings(settings);
fluid_player_settings(settings);
fluid_file_renderer_settings(settings);
fluid_audio_driver_settings(settings);
fluid_midi_driver_settings(settings);
@ -177,10 +201,10 @@ index 78725fb..2061c90 100644
}
static int
diff --git a/libs/fluidsynth/src/fluid_synth.c b/libs/fluidsynth/src/fluid_synth.c
diff --git b/libs/fluidsynth/src/fluid_synth.c a/libs/fluidsynth/src/fluid_synth.c
index 84ee289..a12260c 100644
--- a/libs/fluidsynth/src/fluid_synth.c
+++ b/libs/fluidsynth/src/fluid_synth.c
--- b/libs/fluidsynth/src/fluid_synth.c
+++ a/libs/fluidsynth/src/fluid_synth.c
@@ -471,7 +471,7 @@ struct _fluid_sample_timer_t
/*
* fluid_sample_timer_process - called when synth->ticks is updated
@ -190,10 +214,10 @@ index 84ee289..a12260c 100644
{
fluid_sample_timer_t* st;
long msec;
diff --git a/libs/fluidsynth/src/fluid_synth.h b/libs/fluidsynth/src/fluid_synth.h
diff --git b/libs/fluidsynth/src/fluid_synth.h a/libs/fluidsynth/src/fluid_synth.h
index 3af336d..019a8e0 100644
--- a/libs/fluidsynth/src/fluid_synth.h
+++ b/libs/fluidsynth/src/fluid_synth.h
--- b/libs/fluidsynth/src/fluid_synth.h
+++ a/libs/fluidsynth/src/fluid_synth.h
@@ -37,8 +37,8 @@
#include "fluid_rev.h"
#include "fluid_voice.h"
@ -205,10 +229,10 @@ index 3af336d..019a8e0 100644
#include "fluid_sys.h"
#include "fluid_rvoice_event.h"
diff --git a/libs/fluidsynth/src/fluid_sys.c b/libs/fluidsynth/src/fluid_sys.c
index ee7d8d9..600b04e 100644
--- a/libs/fluidsynth/src/fluid_sys.c
+++ b/libs/fluidsynth/src/fluid_sys.c
diff --git b/libs/fluidsynth/src/fluid_sys.c a/libs/fluidsynth/src/fluid_sys.c
index ee7d8d9..328f255 100644
--- b/libs/fluidsynth/src/fluid_sys.c
+++ a/libs/fluidsynth/src/fluid_sys.c
@@ -686,7 +686,7 @@ fluid_thread_join(fluid_thread_t* thread)
}
@ -218,10 +242,23 @@ index ee7d8d9..600b04e 100644
fluid_timer_run (void *data)
{
fluid_timer_t *timer;
diff --git a/libs/fluidsynth/src/fluid_tuning.c b/libs/fluidsynth/src/fluid_tuning.c
@@ -950,6 +950,7 @@ fluid_ostream_printf (fluid_ostream_t out, char* format, ...)
#endif
}
+#if 0 // Ardour says: no, thanks
int fluid_server_socket_join(fluid_server_socket_t *server_socket)
{
return fluid_thread_join (server_socket->thread);
@@ -1294,3 +1295,4 @@ int delete_fluid_server_socket(fluid_server_socket_t *server_socket)
}
#endif
+#endif
diff --git b/libs/fluidsynth/src/fluid_tuning.c a/libs/fluidsynth/src/fluid_tuning.c
index cc440aa..8977ed6 100644
--- a/libs/fluidsynth/src/fluid_tuning.c
+++ b/libs/fluidsynth/src/fluid_tuning.c
--- b/libs/fluidsynth/src/fluid_tuning.c
+++ a/libs/fluidsynth/src/fluid_tuning.c
@@ -143,7 +143,7 @@ char* fluid_tuning_get_name(fluid_tuning_t* tuning)
return tuning->name;
}
@ -231,10 +268,10 @@ index cc440aa..8977ed6 100644
{
tuning->pitch[key] = pitch;
}
diff --git a/libs/fluidsynth/src/fluidsynth_priv.h b/libs/fluidsynth/src/fluidsynth_priv.h
diff --git b/libs/fluidsynth/src/fluidsynth_priv.h a/libs/fluidsynth/src/fluidsynth_priv.h
index faf2772..74b9f4b 100644
--- a/libs/fluidsynth/src/fluidsynth_priv.h
+++ b/libs/fluidsynth/src/fluidsynth_priv.h
--- b/libs/fluidsynth/src/fluidsynth_priv.h
+++ a/libs/fluidsynth/src/fluidsynth_priv.h
@@ -28,14 +28,6 @@
#include "config.h"
#endif