Skip to content

Commit ccc77bc

Browse files
committed
Fluidsynth: Update patch to 2.4.6
1 parent 684f6b0 commit ccc77bc

2 files changed

Lines changed: 31 additions & 29 deletions

File tree

shared/fluidsynth-no-deps.patch

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
From 379520cc8fe8fb35542bd5273d3d6d81cf4e8d61 Mon Sep 17 00:00:00 2001
1+
From 2ea138dfcb72e765a24fc205798d0b2dfa5c5a3a 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 | 52 +++++++++++++++++++++++++-------------------------
8-
1 file changed, 26 insertions(+), 26 deletions(-)
7+
CMakeLists.txt | 54 +++++++++++++++++++++++++-------------------------
8+
1 file changed, 27 insertions(+), 27 deletions(-)
99

1010
diff --git a/CMakeLists.txt b/CMakeLists.txt
11-
index 8d48251..eb2da3b 100644
11+
index 9c655a7..9259e38 100644
1212
--- a/CMakeLists.txt
1313
+++ b/CMakeLists.txt
14-
@@ -76,41 +76,41 @@ option ( enable-trap-on-fpe "enable SIGFPE trap on Floating Point Exceptions" of
14+
@@ -76,42 +76,42 @@ 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
@@ -50,12 +50,14 @@ index 8d48251..eb2da3b 100644
5050
+option ( enable-waveout "compile Windows WaveOut support (if it is available)" off )
5151
+option ( enable-winmidi "compile Windows MIDI support (if it is available)" off )
5252
option ( enable-sdl2 "compile SDL2 audio support (if it is available)" off )
53+
-option ( enable-sdl3 "compile SDL3 audio support (if it is available)" on )
5354
-option ( enable-pulseaudio "compile PulseAudio support (if it is available)" on )
5455
-option ( enable-pipewire "compile PipeWire support (if it is available)" on )
5556
-option ( enable-readline "compile readline lib line editing (if it is available)" on )
5657
-option ( enable-threads "enable multi-threading support (such as parallel voice synthesis)" on )
5758
-option ( enable-openmp "enable OpenMP support (parallelization of soundfont decoding, vectorization of voice mixing, etc.)" on )
5859
-option ( enable-unicode "enable UNICODE build for Windows" on )
60+
+option ( enable-sdl3 "compile SDL3 audio support (if it is available)" off )
5961
+option ( enable-pulseaudio "compile PulseAudio support (if it is available)" off )
6062
+option ( enable-pipewire "compile PipeWire support (if it is available)" off )
6163
+option ( enable-readline "compile readline lib line editing (if it is available)" off )
@@ -80,5 +82,5 @@ index 8d48251..eb2da3b 100644
8082

8183
if ( CMAKE_SYSTEM MATCHES "OS2" )
8284
--
83-
2.48.1
85+
2.49.0
8486

shared/fluidsynth-no-glib.patch

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 192ef394e0806aaff18aa0d04eeb56b9a7df058d Mon Sep 17 00:00:00 2001
1+
From ef44302fb67f131ad7814ad699d71b56173d7f69 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
@@ -24,10 +24,10 @@ Subject: [PATCH 1/2] Shim glib
2424
create mode 100644 src/glib_shim.h
2525

2626
diff --git a/CMakeLists.txt b/CMakeLists.txt
27-
index 75b8862..8d48251 100644
27+
index e9f9b95..9c655a7 100644
2828
--- a/CMakeLists.txt
2929
+++ b/CMakeLists.txt
30-
@@ -533,8 +533,8 @@ if ( CMAKE_VERSION VERSION_GREATER_EQUAL 3.15 AND VCPKG_TOOLCHAIN )
30+
@@ -536,8 +536,8 @@ if ( CMAKE_VERSION VERSION_GREATER_EQUAL 3.15 AND VCPKG_TOOLCHAIN )
3131
endif ()
3232

3333
# Mandatory libraries: glib and gthread
@@ -52,18 +52,18 @@ index d2e0c5e..683d10c 100644
5252

5353
# Optional dependencies
5454
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
55-
index 0275227..65d8a1a 100644
55+
index 02270ab..06d4c21 100644
5656
--- a/src/CMakeLists.txt
5757
+++ b/src/CMakeLists.txt
58-
@@ -108,6 +108,7 @@ endif ( OBOE_SUPPORT )
58+
@@ -112,6 +112,7 @@ endif ( OBOE_SUPPORT )
5959
set ( config_SOURCES ${FluidSynth_BINARY_DIR}/config.h )
6060

6161
set ( libfluidsynth_SOURCES
6262
+ glib_shim.c
6363
utils/fluid_conv.c
6464
utils/fluid_conv.h
6565
utils/fluid_hash.c
66-
@@ -352,7 +353,7 @@ if ( TARGET OpenMP::OpenMP_C AND HAVE_OPENMP )
66+
@@ -367,7 +368,7 @@ if ( TARGET OpenMP::OpenMP_C AND HAVE_OPENMP )
6767
target_link_libraries ( libfluidsynth-OBJ PUBLIC OpenMP::OpenMP_C )
6868
endif()
6969

@@ -73,7 +73,7 @@ index 0275227..65d8a1a 100644
7373
if ( TARGET SndFile::sndfile AND LIBSNDFILE_SUPPORT )
7474
target_link_libraries ( libfluidsynth-OBJ PUBLIC SndFile::sndfile )
7575
diff --git a/src/bindings/fluid_cmd.c b/src/bindings/fluid_cmd.c
76-
index 444b263..74780e1 100644
76+
index 461ada6..1012132 100644
7777
--- a/src/bindings/fluid_cmd.c
7878
+++ b/src/bindings/fluid_cmd.c
7979
@@ -433,6 +433,8 @@ static const fluid_cmd_t fluid_commands[] =
@@ -213,7 +213,7 @@ index 0000000..08582e3
213213
+
214214
+#endif
215215
diff --git a/src/rvoice/fluid_rvoice_mixer.c b/src/rvoice/fluid_rvoice_mixer.c
216-
index c1e2fb2..9255313 100644
216+
index 3274855..0d5cf3d 100644
217217
--- a/src/rvoice/fluid_rvoice_mixer.c
218218
+++ b/src/rvoice/fluid_rvoice_mixer.c
219219
@@ -478,7 +478,6 @@ fluid_rvoice_buffers_mix(fluid_rvoice_buffers_t *buffers,
@@ -269,10 +269,10 @@ index c1e2fb2..9255313 100644
269269
{
270270
int dsp_i = i * FLUID_MIXER_MAX_BUFFERS_DEFAULT * FLUID_BUFSIZE + j;
271271
diff --git a/src/sfloader/fluid_defsfont.c b/src/sfloader/fluid_defsfont.c
272-
index b601621..a82362d 100644
272+
index 69619c8..9ca418e 100644
273273
--- a/src/sfloader/fluid_defsfont.c
274274
+++ b/src/sfloader/fluid_defsfont.c
275-
@@ -395,8 +395,6 @@ int fluid_defsfont_load_all_sampledata(fluid_defsfont_t *defsfont, SFData *sfdat
275+
@@ -379,8 +379,6 @@ int fluid_defsfont_load_all_sampledata(fluid_defsfont_t *defsfont, SFData *sfdat
276276
}
277277
}
278278

@@ -281,7 +281,7 @@ index b601621..a82362d 100644
281281
for(list = defsfont->sample; list; list = fluid_list_next(list))
282282
{
283283
sample = fluid_list_get(list);
284-
@@ -405,11 +403,9 @@ int fluid_defsfont_load_all_sampledata(fluid_defsfont_t *defsfont, SFData *sfdat
284+
@@ -389,11 +387,9 @@ int fluid_defsfont_load_all_sampledata(fluid_defsfont_t *defsfont, SFData *sfdat
285285
{
286286
/* SF3 samples get loaded individually, as most (or all) of them are in Ogg Vorbis format
287287
* anyway */
@@ -293,7 +293,7 @@ index b601621..a82362d 100644
293293
{
294294
FLUID_LOG(FLUID_ERR, "Failed to load sample '%s'", sample->name);
295295
sample_parsing_result = FLUID_FAILED;
296-
@@ -431,7 +427,6 @@ int fluid_defsfont_load_all_sampledata(fluid_defsfont_t *defsfont, SFData *sfdat
296+
@@ -415,7 +411,6 @@ int fluid_defsfont_load_all_sampledata(fluid_defsfont_t *defsfont, SFData *sfdat
297297
}
298298
else
299299
{
@@ -302,7 +302,7 @@ index b601621..a82362d 100644
302302
int modified;
303303
/* Data pointers of SF2 samples point to large sample data block loaded above */
304304
diff --git a/src/sfloader/fluid_samplecache.c b/src/sfloader/fluid_samplecache.c
305-
index 64e9e9e..4c504c0 100644
305+
index 6e268da..fce84b9 100644
306306
--- a/src/sfloader/fluid_samplecache.c
307307
+++ b/src/sfloader/fluid_samplecache.c
308308
@@ -282,6 +282,7 @@ static fluid_samplecache_entry_t *get_samplecache_entry(SFData *sf,
@@ -342,10 +342,10 @@ index 21535c9..ee3aa0b 100644
342342
}
343343

344344
diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c
345-
index 82cfac4..76fed3d 100644
345+
index f6beb07..cea4254 100644
346346
--- a/src/synth/fluid_synth.c
347347
+++ b/src/synth/fluid_synth.c
348-
@@ -637,8 +637,9 @@ new_fluid_synth(fluid_settings_t *settings)
348+
@@ -652,8 +652,9 @@ new_fluid_synth(fluid_settings_t *settings)
349349
double sample_rate_min, sample_rate_max;
350350

351351
/* initialize all the conversion tables and other stuff */
@@ -356,7 +356,7 @@ index 82cfac4..76fed3d 100644
356356
fluid_synth_init();
357357
}
358358

359-
@@ -817,7 +818,7 @@ new_fluid_synth(fluid_settings_t *settings)
359+
@@ -832,7 +833,7 @@ new_fluid_synth(fluid_settings_t *settings)
360360

361361
fluid_atomic_int_set(&synth->ticks_since_start, 0);
362362
synth->tuning = NULL;
@@ -365,7 +365,7 @@ index 82cfac4..76fed3d 100644
365365

366366
/* Initialize multi-core variables if multiple cores enabled */
367367
if(synth->cores > 1)
368-
@@ -1203,7 +1204,7 @@ delete_fluid_synth(fluid_synth_t *synth)
368+
@@ -1219,7 +1220,7 @@ delete_fluid_synth(fluid_synth_t *synth)
369369
FLUID_FREE(synth->tuning);
370370
}
371371

@@ -374,7 +374,7 @@ index 82cfac4..76fed3d 100644
374374

375375
#ifdef LADSPA
376376
/* Release the LADSPA effects unit */
377-
@@ -7451,7 +7452,7 @@ fluid_synth_tuning_iteration_start(fluid_synth_t *synth)
377+
@@ -7474,7 +7475,7 @@ fluid_synth_tuning_iteration_start(fluid_synth_t *synth)
378378
{
379379
fluid_return_if_fail(synth != NULL);
380380
fluid_synth_api_enter(synth);
@@ -383,7 +383,7 @@ index 82cfac4..76fed3d 100644
383383
fluid_synth_api_exit(synth);
384384
}
385385

386-
@@ -7474,7 +7475,7 @@ fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog)
386+
@@ -7497,7 +7498,7 @@ fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog)
387387
fluid_synth_api_enter(synth);
388388

389389
/* Current tuning iteration stored as: bank << 8 | program */
@@ -392,7 +392,7 @@ index 82cfac4..76fed3d 100644
392392
p = FLUID_POINTER_TO_INT(pval);
393393
b = (p >> 8) & 0xFF;
394394
p &= 0xFF;
395-
@@ -7503,12 +7504,11 @@ fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog)
395+
@@ -7526,12 +7527,11 @@ fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog)
396396

397397
if(p < 127)
398398
{
@@ -408,7 +408,7 @@ index 82cfac4..76fed3d 100644
408408

409409
FLUID_API_RETURN(1);
410410
diff --git a/src/synth/fluid_synth.h b/src/synth/fluid_synth.h
411-
index bcd964f..56c7976 100644
411+
index 262bdec..f925537 100644
412412
--- a/src/synth/fluid_synth.h
413413
+++ b/src/synth/fluid_synth.h
414414
@@ -158,7 +158,7 @@ struct _fluid_synth_t
@@ -421,7 +421,7 @@ index bcd964f..56c7976 100644
421421
fluid_sample_timer_t *sample_timers; /**< List of timers triggered before a block is processed */
422422
unsigned int min_note_length_ticks; /**< If note-offs are triggered just after a note-on, they will be delayed */
423423
diff --git a/src/utils/fluid_sys.c b/src/utils/fluid_sys.c
424-
index babb11f..e82094b 100644
424+
index 9b45d58..50cbe61 100644
425425
--- a/src/utils/fluid_sys.c
426426
+++ b/src/utils/fluid_sys.c
427427
@@ -33,7 +33,7 @@
@@ -527,5 +527,5 @@ index 67e97ab..9dcfbb7 100644
527527
#if HAVE_STDLIB_H
528528
#include <stdlib.h> // malloc, free
529529
--
530-
2.48.1
530+
2.49.0
531531

0 commit comments

Comments
 (0)