Skip to content

Commit 9dec81b

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

File tree

8 files changed

+143
-93
lines changed

8 files changed

+143
-93
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 379520cc8fe8fb35542bd5273d3d6d81cf4e8d61 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: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
From 4edd86332c57377c74a3694129ba9efb91ad82d9 Mon Sep 17 00:00:00 2001
1+
From 192ef394e0806aaff18aa0d04eeb56b9a7df058d 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
55

66
---
77
CMakeLists.txt | 4 +-
8+
FluidSynthConfig.cmake.in | 2 +-
89
src/CMakeLists.txt | 3 +-
910
src/bindings/fluid_cmd.c | 3 +
1011
src/glib_shim.c | 12 ++++
@@ -18,12 +19,12 @@ Subject: [PATCH 1/2] Shim glib
1819
src/utils/fluid_sys.c | 9 ++-
1920
src/utils/fluid_sys.h | 8 +--
2021
src/utils/fluidsynth_priv.h | 2 +-
21-
14 files changed, 142 insertions(+), 35 deletions(-)
22+
15 files changed, 143 insertions(+), 36 deletions(-)
2223
create mode 100644 src/glib_shim.c
2324
create mode 100644 src/glib_shim.h
2425

2526
diff --git a/CMakeLists.txt b/CMakeLists.txt
26-
index 849f8b3..d86b9bc 100644
27+
index 75b8862..8d48251 100644
2728
--- a/CMakeLists.txt
2829
+++ b/CMakeLists.txt
2930
@@ -533,8 +533,8 @@ if ( CMAKE_VERSION VERSION_GREATER_EQUAL 3.15 AND VCPKG_TOOLCHAIN )
@@ -37,8 +38,21 @@ index 849f8b3..d86b9bc 100644
3738

3839
if ( GLib2_VERSION AND GLib2_VERSION VERSION_LESS "2.26.0" )
3940
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!" )
41+
diff --git a/FluidSynthConfig.cmake.in b/FluidSynthConfig.cmake.in
42+
index d2e0c5e..683d10c 100644
43+
--- a/FluidSynthConfig.cmake.in
44+
+++ b/FluidSynthConfig.cmake.in
45+
@@ -73,7 +73,7 @@ if(NOT FLUIDSYNTH_IS_SHARED)
46+
endif()
47+
48+
if(NOT TARGET GLib2::glib-2 OR NOT TARGET GLib2::gthread-2)
49+
- find_dependency(GLib2 @GLIB2_MINUMUM_VERSION@)
50+
+ #find_dependency(GLib2 @GLIB2_MINUMUM_VERSION@)
51+
endif()
52+
53+
# Optional dependencies
4054
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
41-
index a2f9e55..e2a1d75 100644
55+
index 0275227..65d8a1a 100644
4256
--- a/src/CMakeLists.txt
4357
+++ b/src/CMakeLists.txt
4458
@@ -108,6 +108,7 @@ endif ( OBOE_SUPPORT )
@@ -49,7 +63,7 @@ index a2f9e55..e2a1d75 100644
4963
utils/fluid_conv.c
5064
utils/fluid_conv.h
5165
utils/fluid_hash.c
52-
@@ -363,7 +364,7 @@ if ( TARGET OpenMP::OpenMP_C AND HAVE_OPENMP )
66+
@@ -352,7 +353,7 @@ if ( TARGET OpenMP::OpenMP_C AND HAVE_OPENMP )
5367
target_link_libraries ( libfluidsynth-OBJ PUBLIC OpenMP::OpenMP_C )
5468
endif()
5569

@@ -308,10 +322,10 @@ index 64e9e9e..4c504c0 100644
308322
}
309323

310324
diff --git a/src/sfloader/fluid_sffile.c b/src/sfloader/fluid_sffile.c
311-
index 8359424..2aae4db 100644
325+
index 21535c9..ee3aa0b 100644
312326
--- a/src/sfloader/fluid_sffile.c
313327
+++ 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
328+
@@ -2258,10 +2258,14 @@ static int fluid_sffile_read_wav(SFData *sf, unsigned int start, unsigned int en
315329
if(FLUID_IS_BIG_ENDIAN)
316330
{
317331
unsigned int i;
@@ -328,10 +342,10 @@ index 8359424..2aae4db 100644
328342
}
329343

330344
diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c
331-
index e356982..dbfe900 100644
345+
index 82cfac4..76fed3d 100644
332346
--- a/src/synth/fluid_synth.c
333347
+++ b/src/synth/fluid_synth.c
334-
@@ -636,8 +636,9 @@ new_fluid_synth(fluid_settings_t *settings)
348+
@@ -637,8 +637,9 @@ new_fluid_synth(fluid_settings_t *settings)
335349
double sample_rate_min, sample_rate_max;
336350

337351
/* initialize all the conversion tables and other stuff */
@@ -342,7 +356,7 @@ index e356982..dbfe900 100644
342356
fluid_synth_init();
343357
}
344358

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

347361
fluid_atomic_int_set(&synth->ticks_since_start, 0);
348362
synth->tuning = NULL;
@@ -351,7 +365,7 @@ index e356982..dbfe900 100644
351365

352366
/* Initialize multi-core variables if multiple cores enabled */
353367
if(synth->cores > 1)
354-
@@ -1199,7 +1200,7 @@ delete_fluid_synth(fluid_synth_t *synth)
368+
@@ -1203,7 +1204,7 @@ delete_fluid_synth(fluid_synth_t *synth)
355369
FLUID_FREE(synth->tuning);
356370
}
357371

@@ -360,7 +374,7 @@ index e356982..dbfe900 100644
360374

361375
#ifdef LADSPA
362376
/* Release the LADSPA effects unit */
363-
@@ -7450,7 +7451,7 @@ fluid_synth_tuning_iteration_start(fluid_synth_t *synth)
377+
@@ -7451,7 +7452,7 @@ fluid_synth_tuning_iteration_start(fluid_synth_t *synth)
364378
{
365379
fluid_return_if_fail(synth != NULL);
366380
fluid_synth_api_enter(synth);
@@ -369,7 +383,7 @@ index e356982..dbfe900 100644
369383
fluid_synth_api_exit(synth);
370384
}
371385

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

375389
/* Current tuning iteration stored as: bank << 8 | program */
@@ -378,7 +392,7 @@ index e356982..dbfe900 100644
378392
p = FLUID_POINTER_TO_INT(pval);
379393
b = (p >> 8) & 0xFF;
380394
p &= 0xFF;
381-
@@ -7502,12 +7503,11 @@ fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog)
395+
@@ -7503,12 +7504,11 @@ fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog)
382396

383397
if(p < 127)
384398
{
@@ -394,10 +408,10 @@ index e356982..dbfe900 100644
394408

395409
FLUID_API_RETURN(1);
396410
diff --git a/src/synth/fluid_synth.h b/src/synth/fluid_synth.h
397-
index 7dbcdc5..97f5175 100644
411+
index bcd964f..56c7976 100644
398412
--- a/src/synth/fluid_synth.h
399413
+++ b/src/synth/fluid_synth.h
400-
@@ -152,7 +152,7 @@ struct _fluid_synth_t
414+
@@ -158,7 +158,7 @@ struct _fluid_synth_t
401415
fluid_atomic_float_t cpu_load; /**< CPU load in percent (CPU time required / audio synthesized time * 100) */
402416

403417
fluid_tuning_t ***tuning; /**< 128 banks of 128 programs for the tunings */
@@ -462,7 +476,7 @@ index babb11f..e82094b 100644
462476
#if OLD_GLIB_THREAD_API
463477

464478
diff --git a/src/utils/fluid_sys.h b/src/utils/fluid_sys.h
465-
index a756fc0..73abd98 100644
479+
index f491254..1521c4c 100644
466480
--- a/src/utils/fluid_sys.h
467481
+++ b/src/utils/fluid_sys.h
468482
@@ -175,7 +175,7 @@ typedef gintptr intptr_t;
@@ -472,9 +486,9 @@ index a756fc0..73abd98 100644
472486
-#include <glib/gstdio.h>
473487
+#include "glib_shim.h"
474488

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;
489+
#ifdef __cplusplus
490+
extern "C" {
491+
@@ -187,7 +187,7 @@ extern "C" {
478492
* @param err Pointer to a GError to access the message field of.
479493
* @return Message string
480494
*/
@@ -483,7 +497,7 @@ index a756fc0..73abd98 100644
483497

484498
#if defined(_WIN32) || defined(__CYGWIN__)
485499
char* fluid_get_windows_error(void);
486-
@@ -336,13 +336,13 @@ delete_fluid_cond(fluid_cond_t *cond)
500+
@@ -340,13 +340,13 @@ delete_fluid_cond(fluid_cond_t *cond)
487501
}
488502

489503
/* Thread private data */
@@ -513,5 +527,5 @@ index 67e97ab..9dcfbb7 100644
513527
#if HAVE_STDLIB_H
514528
#include <stdlib.h> // malloc, free
515529
--
516-
2.47.1
530+
2.48.1
517531

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 379520cc8fe8fb35542bd5273d3d6d81cf4e8d61 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)