From 683270db64302e59d26b9610514af1cfe0a80493 Mon Sep 17 00:00:00 2001 From: derselbst Date: Wed, 10 Jan 2024 11:10:23 +0100 Subject: [PATCH 1/8] Bump to 2.3.5 --- CMakeLists.txt | 4 ++-- doc/fluidsynth-v20-devdoc.txt | 4 ++-- doc/fluidsynth.1 | 2 +- src/fluidsynth.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac12df883..ea8bbda11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,7 +47,7 @@ set ( PACKAGE "fluidsynth" ) # FluidSynth package version set ( FLUIDSYNTH_VERSION_MAJOR 2 ) set ( FLUIDSYNTH_VERSION_MINOR 3 ) -set ( FLUIDSYNTH_VERSION_MICRO 4 ) +set ( FLUIDSYNTH_VERSION_MICRO 5 ) set ( VERSION "${FLUIDSYNTH_VERSION_MAJOR}.${FLUIDSYNTH_VERSION_MINOR}.${FLUIDSYNTH_VERSION_MICRO}" ) set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" ) @@ -62,7 +62,7 @@ set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" ) # This is not exactly the same algorithm as the libtool one, but the results are the same. set ( LIB_VERSION_CURRENT 3 ) set ( LIB_VERSION_AGE 2 ) -set ( LIB_VERSION_REVISION 2 ) +set ( LIB_VERSION_REVISION 3 ) set ( LIB_VERSION_INFO "${LIB_VERSION_CURRENT}.${LIB_VERSION_AGE}.${LIB_VERSION_REVISION}" ) diff --git a/doc/fluidsynth-v20-devdoc.txt b/doc/fluidsynth-v20-devdoc.txt index 38b82e0ec..ed0a7d617 100644 --- a/doc/fluidsynth-v20-devdoc.txt +++ b/doc/fluidsynth-v20-devdoc.txt @@ -8,8 +8,8 @@ \author David Henningsson \author Tom Moebert \author Copyright © 2003-2023 Peter Hanappe, Conrad Berhörster, Antoine Schmitt, Pedro López-Cabanillas, Josh Green, David Henningsson, Tom Moebert -\version Revision 2.3.4 -\date 2023-09-24 +\version Revision 2.3.5 +\date 2024-01-11 All the source code examples in this document are in the public domain; you can use them as you please. This document is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License. To view a copy of this license, visit https://creativecommons.org/licenses/by-sa/3.0/ . The FluidSynth library is distributed under the GNU Lesser General Public License. A copy of the GNU Lesser General Public License is contained in the FluidSynth package; if not, visit https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/doc/fluidsynth.1 b/doc/fluidsynth.1 index ad6695104..5140312d1 100644 --- a/doc/fluidsynth.1 +++ b/doc/fluidsynth.1 @@ -13,7 +13,7 @@ .\" along with this program; see the file LICENSE. If not, write to .\" the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. .\" -.TH FluidSynth 1 "Jan 1, 2022" +.TH FluidSynth 1 "Jan 1, 2024" .\" Please update the above date whenever this man page is modified. .\" .\" Some roff macros, for reference: diff --git a/src/fluidsynth.c b/src/fluidsynth.c index 4ed19163f..81de1a8d8 100644 --- a/src/fluidsynth.c +++ b/src/fluidsynth.c @@ -1219,7 +1219,7 @@ void print_welcome() { printf("FluidSynth runtime version %s\n" - "Copyright (C) 2000-2023 Peter Hanappe and others.\n" + "Copyright (C) 2000-2024 Peter Hanappe and others.\n" "Distributed under the LGPL license.\n" "SoundFont(R) is a registered trademark of Creative Technology Ltd.\n\n", fluid_version_str()); From 652df6f7d823ad6d7595889012eb71eeeaf1f5f8 Mon Sep 17 00:00:00 2001 From: derselbst Date: Mon, 25 Mar 2024 19:04:25 +0100 Subject: [PATCH 2/8] Fix signedness warning --- src/midi/fluid_midi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/midi/fluid_midi.c b/src/midi/fluid_midi.c index 10561d216..0c516238d 100644 --- a/src/midi/fluid_midi.c +++ b/src/midi/fluid_midi.c @@ -1644,7 +1644,7 @@ fluid_player_handle_reset_synth(void *data, const char *name, int value) static int check_for_on_notes(fluid_synth_t *synth) { fluid_voice_t* v[1024]; - int i, res=FALSE; + unsigned int i, res=FALSE; fluid_synth_get_voicelist(synth, v, FLUID_N_ELEMENTS(v), -1); for(i=0; i Date: Mon, 25 Mar 2024 19:06:32 +0100 Subject: [PATCH 3/8] Fix ISO C warning --- src/drivers/fluid_pipewire.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/fluid_pipewire.c b/src/drivers/fluid_pipewire.c index b96019e87..ee75fd8e3 100644 --- a/src/drivers/fluid_pipewire.c +++ b/src/drivers/fluid_pipewire.c @@ -154,6 +154,7 @@ new_fluid_pipewire_audio_driver2(fluid_settings_t *settings, fluid_audio_func_t char *media_category = NULL; float *buffer = NULL; const struct spa_pod *params[1]; + struct pw_properties *props; drv = FLUID_NEW(fluid_pipewire_audio_driver_t); @@ -196,7 +197,7 @@ new_fluid_pipewire_audio_driver2(fluid_settings_t *settings, fluid_audio_func_t goto driver_cleanup; } - struct pw_properties *props = pw_properties_new(PW_KEY_MEDIA_TYPE, media_type, PW_KEY_MEDIA_CATEGORY, media_category, PW_KEY_MEDIA_ROLE, media_role, NULL); + props = pw_properties_new(PW_KEY_MEDIA_TYPE, media_type, PW_KEY_MEDIA_CATEGORY, media_category, PW_KEY_MEDIA_ROLE, media_role, NULL); pw_properties_setf(props, PW_KEY_NODE_LATENCY, "%d/%d", period_size, (int) sample_rate); pw_properties_setf(props, PW_KEY_NODE_RATE, "1/%d", (int) sample_rate); From 0901883d07efc7900038407a1cc8ec58e852a72d Mon Sep 17 00:00:00 2001 From: Marcus Weseloh Date: Tue, 26 Mar 2024 14:55:55 +0100 Subject: [PATCH 4/8] Stop the pipewire loop before destroying the stream Should fix #1305 --- src/drivers/fluid_pipewire.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/drivers/fluid_pipewire.c b/src/drivers/fluid_pipewire.c index ee75fd8e3..0b46765b3 100644 --- a/src/drivers/fluid_pipewire.c +++ b/src/drivers/fluid_pipewire.c @@ -295,6 +295,11 @@ void delete_fluid_pipewire_audio_driver(fluid_audio_driver_t *p) fluid_pipewire_audio_driver_t *drv = (fluid_pipewire_audio_driver_t *)p; fluid_return_if_fail(drv); + if (drv->pw_loop) + { + pw_thread_loop_stop(drv->pw_loop); + } + if(drv->pw_stream) { pw_stream_destroy(drv->pw_stream); From 05880963e812d94687c2855c26dddd829626e2c0 Mon Sep 17 00:00:00 2001 From: Marcus Weseloh Date: Tue, 26 Mar 2024 15:07:33 +0100 Subject: [PATCH 5/8] Lock thread loop before destroying stream Better fix for #1305 --- src/drivers/fluid_pipewire.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/fluid_pipewire.c b/src/drivers/fluid_pipewire.c index 0b46765b3..70f47ac58 100644 --- a/src/drivers/fluid_pipewire.c +++ b/src/drivers/fluid_pipewire.c @@ -297,7 +297,7 @@ void delete_fluid_pipewire_audio_driver(fluid_audio_driver_t *p) if (drv->pw_loop) { - pw_thread_loop_stop(drv->pw_loop); + pw_thread_loop_lock(drv->pw_loop); } if(drv->pw_stream) @@ -307,6 +307,7 @@ void delete_fluid_pipewire_audio_driver(fluid_audio_driver_t *p) if(drv->pw_loop) { + pw_thread_loop_unlock(drv->pw_loop); pw_thread_loop_destroy(drv->pw_loop); } From 56932cdc1fc6f2eb922e3bc71f1057587c338f72 Mon Sep 17 00:00:00 2001 From: derselbst Date: Tue, 26 Mar 2024 18:19:50 +0100 Subject: [PATCH 6/8] Deprecate LASH support Closes #1285 --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea8bbda11..918cec18b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,7 +102,7 @@ option ( enable-openmp "enable OpenMP support (parallelization of soundfont deco # Platform specific options if ( CMAKE_SYSTEM MATCHES "Linux|FreeBSD|DragonFly" ) - option ( enable-lash "compile LASH support (if it is available)" on ) + option ( enable-lash "compile LASH support (if it is available)" off ) option ( enable-alsa "compile ALSA support (if it is available)" on ) endif ( CMAKE_SYSTEM MATCHES "Linux|FreeBSD|DragonFly" ) @@ -600,6 +600,7 @@ unset ( LASH_SUPPORT CACHE ) if ( enable-lash ) find_package ( LASH ${LASH_MINIMUM_VERSION} ) if ( LASH_FOUND ) + message ( STATUS "Lash support has been deprecated and will be removed in fluidsynth 2.4.0" ) set ( LASH_SUPPORT 1 ) add_definitions ( -DHAVE_LASH ) list( APPEND PC_REQUIRES_PRIV "lash-1.0") From a3b88ccfa41e0cecaf95af44af73d39dc1f47df0 Mon Sep 17 00:00:00 2001 From: derselbst Date: Tue, 26 Mar 2024 18:23:16 +0100 Subject: [PATCH 7/8] Make it a WARNING --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 918cec18b..606bf8e57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -600,7 +600,7 @@ unset ( LASH_SUPPORT CACHE ) if ( enable-lash ) find_package ( LASH ${LASH_MINIMUM_VERSION} ) if ( LASH_FOUND ) - message ( STATUS "Lash support has been deprecated and will be removed in fluidsynth 2.4.0" ) + message ( WARNING "LASH support has been deprecated and will be removed in fluidsynth 2.4.0" ) set ( LASH_SUPPORT 1 ) add_definitions ( -DHAVE_LASH ) list( APPEND PC_REQUIRES_PRIV "lash-1.0") From 895f07de2d5e3f4f13d6ef3877e4ffdd1065f739 Mon Sep 17 00:00:00 2001 From: derselbst Date: Tue, 26 Mar 2024 18:27:45 +0100 Subject: [PATCH 8/8] Fix XG drum bank selection logic Fixes #1307 --- src/synth/fluid_chan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/synth/fluid_chan.c b/src/synth/fluid_chan.c index 0f2eecb44..84ca446b7 100644 --- a/src/synth/fluid_chan.c +++ b/src/synth/fluid_chan.c @@ -325,7 +325,7 @@ fluid_channel_set_bank_msb(fluid_channel_t *chan, int bankmsb) /* XG bank, do drum-channel auto-switch */ /* The number "120" was based on several keyboards having drums at 120 - 127, reference: https://lists.nongnu.org/archive/html/fluid-dev/2011-02/msg00003.html */ - chan->channel_type = (120 <= bankmsb) ? CHANNEL_TYPE_DRUM : CHANNEL_TYPE_MELODIC; + chan->channel_type = (120 == bankmsb || 126 == bankmsb || 127 == bankmsb) ? CHANNEL_TYPE_DRUM : CHANNEL_TYPE_MELODIC; return; }