Skip to content

Commit d47aaf3

Browse files
committed
fluidsynth: Update to 2.4.3 including Windows
1 parent 4a1927f commit d47aaf3

File tree

8 files changed

+113
-91
lines changed

8 files changed

+113
-91
lines changed

shared/fluidsynth-no-deps.patch

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
From dbc6a1bb295fcf815b15ccc963143f8b8589e3ff Mon Sep 17 00:00:00 2001
1+
From 47712628d72bb809a6480de50dd458b220b1fc0b Mon Sep 17 00:00:00 2001
22
From: Ghabry
33
Date: Fri, 17 Mar 2023 14:02:43 +0100
44
Subject: [PATCH 2/2] Disable most features
55

66
---
7-
CMakeLists.txt | 54 +++++++++++++++++++++++++-------------------------
8-
1 file changed, 27 insertions(+), 27 deletions(-)
7+
CMakeLists.txt | 52 +++++++++++++++++++++++++-------------------------
8+
1 file changed, 26 insertions(+), 26 deletions(-)
99

1010
diff --git a/CMakeLists.txt b/CMakeLists.txt
11-
index d86b9bc..d58e43f 100644
11+
index 8d48251..eb2da3b 100644
1212
--- a/CMakeLists.txt
1313
+++ b/CMakeLists.txt
1414
@@ -76,41 +76,41 @@ option ( enable-trap-on-fpe "enable SIGFPE trap on Floating Point Exceptions" of
@@ -43,20 +43,19 @@ index d86b9bc..d58e43f 100644
4343
-option ( enable-wasapi "compile Windows WASAPI support (if it is available)" on )
4444
-option ( enable-waveout "compile Windows WaveOut support (if it is available)" on )
4545
-option ( enable-winmidi "compile Windows MIDI support (if it is available)" on )
46-
-option ( enable-sdl2 "compile SDL2 audio support (if it is available)" on )
47-
-option ( enable-pulseaudio "compile PulseAudio support (if it is available)" on )
48-
-option ( enable-pipewire "compile PipeWire support (if it is available)" on )
49-
-option ( enable-readline "compile readline lib line editing (if it is available)" on )
50-
-option ( enable-threads "enable multi-threading support (such as parallel voice synthesis)" on )
51-
-option ( enable-openmp "enable OpenMP support (parallelization of soundfont decoding, vectorization of voice mixing, etc.)" on )
52-
-option ( enable-unicode "enable UNICODE build for Windows" on )
5346
+option ( enable-network "enable network support (requires BSD sockets)" off )
5447
+option ( enable-oss "compile OSS support (if it is available)" off )
5548
+option ( enable-dsound "compile DirectSound support (if it is available)" off )
5649
+option ( enable-wasapi "compile Windows WASAPI support (if it is available)" off )
5750
+option ( enable-waveout "compile Windows WaveOut support (if it is available)" off )
5851
+option ( enable-winmidi "compile Windows MIDI support (if it is available)" off )
59-
+option ( enable-sdl2 "compile SDL2 audio support (if it is available)" off )
52+
option ( enable-sdl2 "compile SDL2 audio support (if it is available)" off )
53+
-option ( enable-pulseaudio "compile PulseAudio support (if it is available)" on )
54+
-option ( enable-pipewire "compile PipeWire support (if it is available)" on )
55+
-option ( enable-readline "compile readline lib line editing (if it is available)" on )
56+
-option ( enable-threads "enable multi-threading support (such as parallel voice synthesis)" on )
57+
-option ( enable-openmp "enable OpenMP support (parallelization of soundfont decoding, vectorization of voice mixing, etc.)" on )
58+
-option ( enable-unicode "enable UNICODE build for Windows" on )
6059
+option ( enable-pulseaudio "compile PulseAudio support (if it is available)" off )
6160
+option ( enable-pipewire "compile PipeWire support (if it is available)" off )
6261
+option ( enable-readline "compile readline lib line editing (if it is available)" off )
@@ -81,5 +80,5 @@ index d86b9bc..d58e43f 100644
8180

8281
if ( CMAKE_SYSTEM MATCHES "OS2" )
8382
--
84-
2.47.1
83+
2.48.1
8584

shared/fluidsynth-no-glib.patch

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 4edd86332c57377c74a3694129ba9efb91ad82d9 Mon Sep 17 00:00:00 2001
1+
From ecc399d88012c5f36016337af307495c72d9b0c5 Mon Sep 17 00:00:00 2001
22
From: Ghabry
33
Date: Fri, 17 Mar 2023 14:00:45 +0100
44
Subject: [PATCH 1/2] Shim glib
@@ -23,7 +23,7 @@ Subject: [PATCH 1/2] Shim glib
2323
create mode 100644 src/glib_shim.h
2424

2525
diff --git a/CMakeLists.txt b/CMakeLists.txt
26-
index 849f8b3..d86b9bc 100644
26+
index 75b8862..8d48251 100644
2727
--- a/CMakeLists.txt
2828
+++ b/CMakeLists.txt
2929
@@ -533,8 +533,8 @@ if ( CMAKE_VERSION VERSION_GREATER_EQUAL 3.15 AND VCPKG_TOOLCHAIN )
@@ -38,7 +38,7 @@ index 849f8b3..d86b9bc 100644
3838
if ( GLib2_VERSION AND GLib2_VERSION VERSION_LESS "2.26.0" )
3939
message ( WARNING "Your version of glib is very old. This may cause problems with fluidsynth's sample cache on Windows. Consider updating to glib 2.26 or newer!" )
4040
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
41-
index a2f9e55..e2a1d75 100644
41+
index 0275227..65d8a1a 100644
4242
--- a/src/CMakeLists.txt
4343
+++ b/src/CMakeLists.txt
4444
@@ -108,6 +108,7 @@ endif ( OBOE_SUPPORT )
@@ -49,7 +49,7 @@ index a2f9e55..e2a1d75 100644
4949
utils/fluid_conv.c
5050
utils/fluid_conv.h
5151
utils/fluid_hash.c
52-
@@ -363,7 +364,7 @@ if ( TARGET OpenMP::OpenMP_C AND HAVE_OPENMP )
52+
@@ -352,7 +353,7 @@ if ( TARGET OpenMP::OpenMP_C AND HAVE_OPENMP )
5353
target_link_libraries ( libfluidsynth-OBJ PUBLIC OpenMP::OpenMP_C )
5454
endif()
5555

@@ -308,10 +308,10 @@ index 64e9e9e..4c504c0 100644
308308
}
309309

310310
diff --git a/src/sfloader/fluid_sffile.c b/src/sfloader/fluid_sffile.c
311-
index 8359424..2aae4db 100644
311+
index 21535c9..ee3aa0b 100644
312312
--- a/src/sfloader/fluid_sffile.c
313313
+++ b/src/sfloader/fluid_sffile.c
314-
@@ -2252,10 +2252,14 @@ static int fluid_sffile_read_wav(SFData *sf, unsigned int start, unsigned int en
314+
@@ -2258,10 +2258,14 @@ static int fluid_sffile_read_wav(SFData *sf, unsigned int start, unsigned int en
315315
if(FLUID_IS_BIG_ENDIAN)
316316
{
317317
unsigned int i;
@@ -328,10 +328,10 @@ index 8359424..2aae4db 100644
328328
}
329329

330330
diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c
331-
index e356982..dbfe900 100644
331+
index 82cfac4..76fed3d 100644
332332
--- a/src/synth/fluid_synth.c
333333
+++ b/src/synth/fluid_synth.c
334-
@@ -636,8 +636,9 @@ new_fluid_synth(fluid_settings_t *settings)
334+
@@ -637,8 +637,9 @@ new_fluid_synth(fluid_settings_t *settings)
335335
double sample_rate_min, sample_rate_max;
336336

337337
/* initialize all the conversion tables and other stuff */
@@ -342,7 +342,7 @@ index e356982..dbfe900 100644
342342
fluid_synth_init();
343343
}
344344

345-
@@ -813,7 +814,7 @@ new_fluid_synth(fluid_settings_t *settings)
345+
@@ -817,7 +818,7 @@ new_fluid_synth(fluid_settings_t *settings)
346346

347347
fluid_atomic_int_set(&synth->ticks_since_start, 0);
348348
synth->tuning = NULL;
@@ -351,7 +351,7 @@ index e356982..dbfe900 100644
351351

352352
/* Initialize multi-core variables if multiple cores enabled */
353353
if(synth->cores > 1)
354-
@@ -1199,7 +1200,7 @@ delete_fluid_synth(fluid_synth_t *synth)
354+
@@ -1203,7 +1204,7 @@ delete_fluid_synth(fluid_synth_t *synth)
355355
FLUID_FREE(synth->tuning);
356356
}
357357

@@ -360,7 +360,7 @@ index e356982..dbfe900 100644
360360

361361
#ifdef LADSPA
362362
/* Release the LADSPA effects unit */
363-
@@ -7450,7 +7451,7 @@ fluid_synth_tuning_iteration_start(fluid_synth_t *synth)
363+
@@ -7451,7 +7452,7 @@ fluid_synth_tuning_iteration_start(fluid_synth_t *synth)
364364
{
365365
fluid_return_if_fail(synth != NULL);
366366
fluid_synth_api_enter(synth);
@@ -369,7 +369,7 @@ index e356982..dbfe900 100644
369369
fluid_synth_api_exit(synth);
370370
}
371371

372-
@@ -7473,7 +7474,7 @@ fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog)
372+
@@ -7474,7 +7475,7 @@ fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog)
373373
fluid_synth_api_enter(synth);
374374

375375
/* Current tuning iteration stored as: bank << 8 | program */
@@ -378,7 +378,7 @@ index e356982..dbfe900 100644
378378
p = FLUID_POINTER_TO_INT(pval);
379379
b = (p >> 8) & 0xFF;
380380
p &= 0xFF;
381-
@@ -7502,12 +7503,11 @@ fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog)
381+
@@ -7503,12 +7504,11 @@ fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog)
382382

383383
if(p < 127)
384384
{
@@ -394,10 +394,10 @@ index e356982..dbfe900 100644
394394

395395
FLUID_API_RETURN(1);
396396
diff --git a/src/synth/fluid_synth.h b/src/synth/fluid_synth.h
397-
index 7dbcdc5..97f5175 100644
397+
index bcd964f..56c7976 100644
398398
--- a/src/synth/fluid_synth.h
399399
+++ b/src/synth/fluid_synth.h
400-
@@ -152,7 +152,7 @@ struct _fluid_synth_t
400+
@@ -158,7 +158,7 @@ struct _fluid_synth_t
401401
fluid_atomic_float_t cpu_load; /**< CPU load in percent (CPU time required / audio synthesized time * 100) */
402402

403403
fluid_tuning_t ***tuning; /**< 128 banks of 128 programs for the tunings */
@@ -462,7 +462,7 @@ index babb11f..e82094b 100644
462462
#if OLD_GLIB_THREAD_API
463463

464464
diff --git a/src/utils/fluid_sys.h b/src/utils/fluid_sys.h
465-
index a756fc0..73abd98 100644
465+
index f491254..1521c4c 100644
466466
--- a/src/utils/fluid_sys.h
467467
+++ b/src/utils/fluid_sys.h
468468
@@ -175,7 +175,7 @@ typedef gintptr intptr_t;
@@ -472,9 +472,9 @@ index a756fc0..73abd98 100644
472472
-#include <glib/gstdio.h>
473473
+#include "glib_shim.h"
474474

475-
/**
476-
* Macro used for safely accessing a message from a GError and using a default
477-
@@ -183,7 +183,7 @@ typedef gintptr intptr_t;
475+
#ifdef __cplusplus
476+
extern "C" {
477+
@@ -187,7 +187,7 @@ extern "C" {
478478
* @param err Pointer to a GError to access the message field of.
479479
* @return Message string
480480
*/
@@ -483,7 +483,7 @@ index a756fc0..73abd98 100644
483483

484484
#if defined(_WIN32) || defined(__CYGWIN__)
485485
char* fluid_get_windows_error(void);
486-
@@ -336,13 +336,13 @@ delete_fluid_cond(fluid_cond_t *cond)
486+
@@ -340,13 +340,13 @@ delete_fluid_cond(fluid_cond_t *cond)
487487
}
488488

489489
/* Thread private data */
@@ -513,5 +513,5 @@ index 67e97ab..9dcfbb7 100644
513513
#if HAVE_STDLIB_H
514514
#include <stdlib.h> // malloc, free
515515
--
516-
2.47.1
516+
2.48.1
517517

shared/packages.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ arguments = "--disable-http --disable-examples"
107107
anitya_id = 10353
108108

109109
[fluidsynth]
110-
version = 2.4.2
110+
version = 2.4.3
111111
url = "https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v${version}.tar.gz"
112112
arguments = "-DLIB_SUFFIX=''"
113113
anitya_id = 10437

shared/packages.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ OPUSFILE_URL="https://github.com/xiph/opusfile/releases/download/v0.12/opusfile-
7272
OPUSFILE_ARGS="--disable-http --disable-examples"
7373
OPUSFILE_DIR="opusfile-0.12"
7474

75-
FLUIDSYNTH_URL="https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.4.2.tar.gz"
75+
FLUIDSYNTH_URL="https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.4.3.tar.gz"
7676
FLUIDSYNTH_ARGS="-DLIB_SUFFIX=''"
77-
FLUIDSYNTH_DIR="fluidsynth-2.4.2"
77+
FLUIDSYNTH_DIR="fluidsynth-2.4.3"
7878

7979
FLUIDLITE_URL="https://github.com/divideconcept/FluidLite/archive/57a0e74e708f699b13d7c85b28a4e1ff5b71887c.zip"
8080
FLUIDLITE_ARGS="-DFLUIDLITE_BUILD_STATIC=ON -DFLUIDLITE_BUILD_SHARED=OFF"

windows/fluidsynth-easyrpg/fluidsynth-no-deps.patch

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
From d11f0149429f8fc5a2f9ad79c7d9040bf72af5cc Mon Sep 17 00:00:00 2001
1+
From 47712628d72bb809a6480de50dd458b220b1fc0b Mon Sep 17 00:00:00 2001
22
From: Ghabry
33
Date: Fri, 17 Mar 2023 14:02:43 +0100
4-
Subject: [PATCH] Disable most features
4+
Subject: [PATCH 2/2] Disable most features
55

66
---
7-
CMakeLists.txt | 54 +++++++++++++++++++++++++-------------------------
8-
1 file changed, 27 insertions(+), 27 deletions(-)
7+
CMakeLists.txt | 52 +++++++++++++++++++++++++-------------------------
8+
1 file changed, 26 insertions(+), 26 deletions(-)
99

1010
diff --git a/CMakeLists.txt b/CMakeLists.txt
11-
index 433197fe..df81f4c7 100644
11+
index 8d48251..eb2da3b 100644
1212
--- a/CMakeLists.txt
1313
+++ b/CMakeLists.txt
14-
@@ -76,44 +76,44 @@ option ( enable-trap-on-fpe "enable SIGFPE trap on Floating Point Exceptions" of
14+
@@ -76,41 +76,41 @@ option ( enable-trap-on-fpe "enable SIGFPE trap on Floating Point Exceptions" of
1515
option ( enable-ubsan "compile and link against UBSan (for debugging fluidsynth internals)" off )
1616

1717
# Options enabled by default
18+
-option ( enable-alsa "compile ALSA support (if it is available)" on )
1819
-option ( enable-aufile "compile support for sound file output" on )
1920
-option ( BUILD_SHARED_LIBS "Build a shared object or DLL" on )
2021
-option ( enable-dbus "compile DBUS support (if it is available)" on )
@@ -24,6 +25,7 @@ index 433197fe..df81f4c7 100644
2425
-option ( enable-libinstpatch "use libinstpatch (if available) to load DLS and GIG files" on )
2526
-option ( enable-libsndfile "compile libsndfile support (if it is available)" on )
2627
-option ( enable-midishare "compile MidiShare support (if it is available)" on )
28+
+option ( enable-alsa "compile ALSA support (if it is available)" off )
2729
+option ( enable-aufile "compile support for sound file output" off )
2830
+option ( BUILD_SHARED_LIBS "Build a shared object or DLL" off )
2931
+option ( enable-dbus "compile DBUS support (if it is available)" off )
@@ -41,32 +43,27 @@ index 433197fe..df81f4c7 100644
4143
-option ( enable-wasapi "compile Windows WASAPI support (if it is available)" on )
4244
-option ( enable-waveout "compile Windows WaveOut support (if it is available)" on )
4345
-option ( enable-winmidi "compile Windows MIDI support (if it is available)" on )
44-
-option ( enable-sdl2 "compile SDL2 audio support (if it is available)" on )
45-
-option ( enable-pulseaudio "compile PulseAudio support (if it is available)" on )
46-
-option ( enable-pipewire "compile PipeWire support (if it is available)" on )
47-
-option ( enable-readline "compile readline lib line editing (if it is available)" on )
48-
-option ( enable-threads "enable multi-threading support (such as parallel voice synthesis)" on )
49-
-option ( enable-openmp "enable OpenMP support (parallelization of soundfont decoding, vectorization of voice mixing, etc.)" on )
5046
+option ( enable-network "enable network support (requires BSD sockets)" off )
5147
+option ( enable-oss "compile OSS support (if it is available)" off )
5248
+option ( enable-dsound "compile DirectSound support (if it is available)" off )
5349
+option ( enable-wasapi "compile Windows WASAPI support (if it is available)" off )
5450
+option ( enable-waveout "compile Windows WaveOut support (if it is available)" off )
5551
+option ( enable-winmidi "compile Windows MIDI support (if it is available)" off )
56-
+option ( enable-sdl2 "compile SDL2 audio support (if it is available)" off )
52+
option ( enable-sdl2 "compile SDL2 audio support (if it is available)" off )
53+
-option ( enable-pulseaudio "compile PulseAudio support (if it is available)" on )
54+
-option ( enable-pipewire "compile PipeWire support (if it is available)" on )
55+
-option ( enable-readline "compile readline lib line editing (if it is available)" on )
56+
-option ( enable-threads "enable multi-threading support (such as parallel voice synthesis)" on )
57+
-option ( enable-openmp "enable OpenMP support (parallelization of soundfont decoding, vectorization of voice mixing, etc.)" on )
58+
-option ( enable-unicode "enable UNICODE build for Windows" on )
5759
+option ( enable-pulseaudio "compile PulseAudio support (if it is available)" off )
5860
+option ( enable-pipewire "compile PipeWire support (if it is available)" off )
5961
+option ( enable-readline "compile readline lib line editing (if it is available)" off )
6062
+option ( enable-threads "enable multi-threading support (such as parallel voice synthesis)" off )
6163
+option ( enable-openmp "enable OpenMP support (parallelization of soundfont decoding, vectorization of voice mixing, etc.)" off )
64+
+option ( enable-unicode "enable UNICODE build for Windows" off )
6265

6366
# Platform specific options
64-
if ( CMAKE_SYSTEM MATCHES "Linux|FreeBSD|DragonFly" )
65-
option ( enable-lash "compile LASH support (if it is available)" off )
66-
- option ( enable-alsa "compile ALSA support (if it is available)" on )
67-
+ option ( enable-alsa "compile ALSA support (if it is available)" off )
68-
endif ( CMAKE_SYSTEM MATCHES "Linux|FreeBSD|DragonFly" )
69-
7067
if ( CMAKE_SYSTEM MATCHES "Linux" )
7168
- option ( enable-systemd "compile systemd support (if it is available)" on )
7269
+ option ( enable-systemd "compile systemd support (if it is available)" off )
@@ -83,5 +80,5 @@ index 433197fe..df81f4c7 100644
8380

8481
if ( CMAKE_SYSTEM MATCHES "OS2" )
8582
--
86-
2.44.0
83+
2.48.1
8784

0 commit comments

Comments
 (0)