1- From 4edd86332c57377c74a3694129ba9efb91ad82d9 Mon Sep 17 00:00:00 2001
1+ From ecc399d88012c5f36016337af307495c72d9b0c5 Mon Sep 17 00:00:00 2001
22From: Ghabry
33Date: Fri, 17 Mar 2023 14:00:45 +0100
44Subject: [PATCH 1/2] Shim glib
@@ -23,7 +23,7 @@ Subject: [PATCH 1/2] Shim glib
2323 create mode 100644 src/glib_shim.h
2424
2525diff --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!" )
4040diff --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
310310diff --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
330330diff --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);
396396diff --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
464464diff --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
0 commit comments