Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package fluidsynth for openSUSE:Factory checked in at 2022-12-30 11:08:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fluidsynth (Old)
and /work/SRC/openSUSE:Factory/.fluidsynth.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fluidsynth"
Fri Dec 30 11:08:18 2022 rev:70 rq:1045719 version:2.3.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/fluidsynth/fluidsynth.changes 2022-09-27 20:13:06.977719250 +0200
+++ /work/SRC/openSUSE:Factory/.fluidsynth.new.1563/fluidsynth.changes 2022-12-30 11:08:25.969066296 +0100
@@ -1,0 +2,10 @@
+Thu Dec 29 11:01:45 UTC 2022 - Tom Mbrt
+
+- Update to 2.3.1
+ * Prevent MIDI player from finishing prematurely
+ * Fix a crash when enumerating rawmidi ALSA devices
+ * Restore systemd sandboxing options and make it work with user units
+ * Handle conflict with pipewire systemd daemon
+- Fix bsc#1204236 by turning systemd service into user service
+
+-------------------------------------------------------------------
Old:
----
fluidsynth-2.3.0.tar.gz
New:
----
fluidsynth-2.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ fluidsynth.spec ++++++
--- /var/tmp/diff_new_pack.7vHWGs/_old 2022-12-30 11:08:26.541069716 +0100
+++ /var/tmp/diff_new_pack.7vHWGs/_new 2022-12-30 11:08:26.545069739 +0100
@@ -18,7 +18,7 @@
%define sover 3
Name: fluidsynth
-Version: 2.3.0
+Version: 2.3.1
Release: 0
Summary: A Real-Time Software Synthesizer That Uses Soundfont(tm)
License: LGPL-2.1-or-later
@@ -40,10 +40,7 @@
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(sndfile)
Recommends: fluid-soundfont-gm
-Requires(pre): %fillup_prereq
-Requires(pre): group(audio)
-Requires(pre): shadow
-%{?systemd_requires}
+%{?systemd_ordering}
%description
FluidSynth (formerly IIWU Synth) is a real-time software synthesizer
@@ -90,23 +87,21 @@
%cmake_install
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
install -Dpm0644 %{SOURCE1} %{buildroot}%{_fillupdir}/sysconfig.%{name}
-install -Dpm0644 build/fluidsynth.service %{buildroot}%{_unitdir}/%{name}.service
+install -Dpm0644 build/fluidsynth.service %{buildroot}%{_userunitdir}/%{name}.service
mkdir %{buildroot}%{_sbindir}
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
%pre
-getent passwd %{name} >/dev/null || useradd -rc 'FluidSynth GM daemon' -s /bin/false -d %{_localstatedir}/lib/%{name} -g audio %{name}
-%service_add_pre %{name}.service
+%systemd_user_pre %{name}.service
%post
-%fillup_only
-%service_add_post %{name}.service
+%systemd_user_post %{name}.service
%preun
-%service_del_preun %{name}.service
+%systemd_user_preun %{name}.service
%postun
-%service_del_postun %{name}.service
+%systemd_user_postun %{name}.service
%post -n libfluidsynth%{sover} -p /sbin/ldconfig
%postun -n libfluidsynth%{sover} -p /sbin/ldconfig
@@ -119,7 +114,7 @@
%{_fillupdir}/sysconfig.%{name}
%{_mandir}/man1/%{name}.1%{?ext_man}
%{_sbindir}/rc%{name}
-%{_unitdir}/%{name}.service
+%{_userunitdir}/%{name}.service
%files devel
%{_includedir}/%{name}
++++++ fluidsynth-2.3.0.tar.gz -> fluidsynth-2.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.azure/azure-pipelines-mac.yml new/fluidsynth-2.3.1/.azure/azure-pipelines-mac.yml
--- old/fluidsynth-2.3.0/.azure/azure-pipelines-mac.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.azure/azure-pipelines-mac.yml 2022-12-28 12:43:59.000000000 +0100
@@ -85,11 +85,11 @@
#11_0_universal_unixlibs:
# macPortsUrl: 'https://github.com/macports/macports-base/releases/download/v2.7.2/MacPorts-...'
# imageName: 'macos-11'
- # CMakeFlags: '-Denable-sdl2=0 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -Denable-framework=0 -DLIB_SUFFIX=""'
+ # CMakeFlags: '-Denable-sdl2=0 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -Denable-framework=0
12_0_universal_unixlibs:
macPortsUrl: 'https://github.com/macports/macports-base/releases/download/v2.7.2/MacPorts-...'
imageName: 'macos-12'
- CMakeFlags: '-Denable-sdl2=0 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -Denable-framework=0 -DLIB_SUFFIX=""'
+ CMakeFlags: '-Denable-sdl2=0 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -Denable-framework=0'
pool:
vmImage: $(imageName)
steps:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.azure/azure-pipelines-vcpkg.yml new/fluidsynth-2.3.1/.azure/azure-pipelines-vcpkg.yml
--- old/fluidsynth-2.3.0/.azure/azure-pipelines-vcpkg.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.azure/azure-pipelines-vcpkg.yml 2022-12-28 12:43:59.000000000 +0100
@@ -31,7 +31,7 @@
toolset: 'v142'
generator: 'Visual Studio 16 2019'
configuration: 'RelWithDebInfo'
- VCPKG_REVISION: 'e809a42f87565e803b2178a0c11263f462d1800a'
+ VCPKG_REVISION: 'acc3bcf76b84ae5041c86ab55fe138ae7b8255c7'
jobs:
- job: vcpkg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.azure/cmake-android.yml new/fluidsynth-2.3.1/.azure/cmake-android.yml
--- old/fluidsynth-2.3.0/.azure/cmake-android.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.azure/cmake-android.yml 2022-12-28 12:43:59.000000000 +0100
@@ -47,7 +47,7 @@
-DCMAKE_STAGING_PREFIX=${PREFIX} \
-DCMAKE_VERBOSE_MAKEFILE=1 \
-DBUILD_SHARED_LIBS=1 \
- -DLIB_SUFFIX="" \
+ -DLIB_SUFFIX= \
${{ parameters.cmakeArgs }} ..
make -j$((`nproc`+1))
${{ parameters.installCommand }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.circleci/config.yml new/fluidsynth-2.3.1/.circleci/config.yml
--- old/fluidsynth-2.3.0/.circleci/config.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.circleci/config.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,67 +0,0 @@
-version: 2.1
-orbs:
- android: circleci/android@0.2.1
-jobs:
- build:
- working_directory: ~/code
- docker:
- - image: circleci/android:api-30
- environment:
- JVM_OPTS: -Xmx3200m
- steps:
- - run:
- name: Setup Git email and user for Cerbero
- command: git config --global user.email "ci@beatscratch.io" && git config --global user.name "CI testing"
- # - android/install-ndk:
- # ndk-version: android-ndk-r18b
- # ndk-sha: 500679655da3a86aecf67007e8ab230ea9b4dd7b
- - run:
- name: Install FluidSynth build dependencies
- command: sudo apt-get update && sudo apt-get install autotools-dev automake autoconf libtool g++ autopoint make cmake
- bison flex yasm pkg-config libpulse-dev
- python3-dev gettext build-essential pkg-config curl
- libasound2-dev dpkg-dev
- debhelper build-essential devscripts fakeroot transfig gperf libdbus-glib-1-dev
- wget glib-networking libxtst-dev libxrandr-dev
- git intltool ccache python3-setuptools autogen maven make
- - checkout
- - run:
- name: Build Cerbero and Oboe
- working_directory: doc/android
- command: |
- export TERM=dumb
- export VERBOSE=1
- echo Starting `nproc` parallel jobs
- make -f Makefile.android prepare
- - run:
- name: Link Cerbero NDK for build
- command: |
- mkdir -p /home/circleci/android-sdk-linux
- echo "android-ndk-21 content"
- ls /home/circleci/code/doc/android/external/cerbero/build/android-ndk-21
- ln -s /home/circleci/code/doc/android/external/cerbero/build/android-ndk-21 /home/circleci/android-sdk-linux/ndk-bundle
- echo "/home/circleci/android-sdk-linux/ndk-bundle content"
- ls /home/circleci/android-sdk-linux/ndk-bundle
- - run:
- name: Build FluidSynth Android
- working_directory: doc/android
- command: |
- export TERM=dumb
- make -f Makefile.android
- - run:
- name: Show directory contents
- working_directory: doc/android
- command: |
- ls -R
- mv ./external/cerbero/build/logs dist/
- cp ./external/cerbero/build/sources/android_armv7/glib-2.62.6/_builddir/meson*.txt dist/armeabi-v7a/
- cp ./external/cerbero/build/sources/android_arm64/glib-2.62.6/_builddir/meson*.txt dist/arm64-v8a/
- cp ./external/cerbero/build/sources/android_x86/glib-2.62.6/_builddir/meson*.txt dist/x86/
- cp ./external/cerbero/build/sources/android_x86_64/glib-2.62.6/_builddir/meson*.txt dist/x86_64/
- - run:
- name: Zip FluidSynth Android Distribution
- working_directory: doc/android
- command: zip -r android-dist.zip dist
- - store_artifacts:
- path: doc/android/android-dist.zip
- destination: android-dist.zip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.github/workflows/api_doc_build.yml new/fluidsynth-2.3.1/.github/workflows/api_doc_build.yml
--- old/fluidsynth-2.3.0/.github/workflows/api_doc_build.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.github/workflows/api_doc_build.yml 2022-12-28 12:43:59.000000000 +0100
@@ -13,7 +13,7 @@
runs-on: ubuntu-22.04
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
persist-credentials: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.github/workflows/codeql-analysis.yml new/fluidsynth-2.3.1/.github/workflows/codeql-analysis.yml
--- old/fluidsynth-2.3.0/.github/workflows/codeql-analysis.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.github/workflows/codeql-analysis.yml 2022-12-28 12:43:59.000000000 +0100
@@ -39,11 +39,11 @@
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@v1
+ uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -51,10 +51,13 @@
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
+ - name: Install Dependencies
+ run: sudo -E apt-get -yq --no-install-suggests --no-install-recommends install cmake-data cmake libglib2.0-0 libsndfile-dev libasound2-dev libjack-dev portaudio19-dev libsdl2-dev libpulse-dev libdbus-1-dev libinstpatch-dev libreadline-dev
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@v1
+ uses: github/codeql-action/autobuild@v2
# ������ Command-line programs to run using the OS shell.
# ���� https://git.io/JvXDl
@@ -68,4 +71,4 @@
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v1
+ uses: github/codeql-action/analyze@v2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.github/workflows/linux.yml new/fluidsynth-2.3.1/.github/workflows/linux.yml
--- old/fluidsynth-2.3.0/.github/workflows/linux.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.github/workflows/linux.yml 2022-12-28 12:43:59.000000000 +0100
@@ -43,7 +43,7 @@
# clang11 is covered by openSUSE Leap 15.3
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- name: Add apt-get repositories
run: |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.github/workflows/sonarcloud.yml new/fluidsynth-2.3.1/.github/workflows/sonarcloud.yml
--- old/fluidsynth-2.3.0/.github/workflows/sonarcloud.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.github/workflows/sonarcloud.yml 2022-12-28 12:43:59.000000000 +0100
@@ -21,9 +21,9 @@
name: SonarCloud Workflow
jobs:
sonarcloud:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
@@ -36,7 +36,7 @@
run: sudo apt-get update -y
- name: Install Dependencies
- run: sudo -E apt-get -yq --no-install-suggests --no-install-recommends install cmake-data cmake libglib2.0-0 libsndfile-dev libasound2-dev libjack-dev portaudio19-dev libsdl2-dev libpulse-dev libdbus-1-dev libsystemd-dev libinstpatch-dev libreadline-dev lcov gcovr ggcov
+ run: sudo -E apt-get -yq --no-install-suggests --no-install-recommends install cmake-data cmake libglib2.0-0 libsndfile-dev libasound2-dev libjack-dev portaudio19-dev libsdl2-dev libpulse-dev libdbus-1-dev libsystemd-dev libinstpatch-dev libreadline-dev lcov gcovr
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.obs/workflows.yml new/fluidsynth-2.3.1/.obs/workflows.yml
--- old/fluidsynth-2.3.0/.obs/workflows.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.obs/workflows.yml 2022-12-28 12:43:59.000000000 +0100
@@ -1,6 +1,18 @@
-workflow:
+main_workflow:
steps:
- branch_package:
source_project: home:derselbst:anmp
source_package: fluidsynth
target_project: home:derselbst:anmp:github-ci
+ filters:
+ event: pull_request
+rebuild_master:
+ steps:
+ - rebuild_package:
+ project: home:derselbst:anmp
+ package: fluidsynth
+ filters:
+ event: push
+ branches:
+ only:
+ - master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/AUTHORS new/fluidsynth-2.3.1/AUTHORS
--- old/fluidsynth-2.3.0/AUTHORS 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/AUTHORS 2022-12-28 12:43:59.000000000 +0100
@@ -125,6 +125,8 @@
soundfonts, added support for DLS soundfonts, fixed various bugs, implemented
unit tests and CI builds for Windows, Linux, MacOSX and BSD.
+* Fabian Greffrath added initial support of vorbis-compressed sf3 sound fonts.
+
* Growing list of individuals who contributed bug fixes, corrections and minor features:
Nicolas Boulicault for ALSA sequencer midi.portname setting.
Werner Schweer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/CMakeLists.txt new/fluidsynth-2.3.1/CMakeLists.txt
--- old/fluidsynth-2.3.0/CMakeLists.txt 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/CMakeLists.txt 2022-12-28 12:43:59.000000000 +0100
@@ -41,7 +41,7 @@
# FluidSynth package version
set ( FLUIDSYNTH_VERSION_MAJOR 2 )
set ( FLUIDSYNTH_VERSION_MINOR 3 )
-set ( FLUIDSYNTH_VERSION_MICRO 0 )
+set ( FLUIDSYNTH_VERSION_MICRO 1 )
set ( VERSION "${FLUIDSYNTH_VERSION_MAJOR}.${FLUIDSYNTH_VERSION_MINOR}.${FLUIDSYNTH_VERSION_MICRO}" )
set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" )
@@ -56,7 +56,7 @@
# 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 1 )
-set ( LIB_VERSION_REVISION 3 )
+set ( LIB_VERSION_REVISION 4 )
set ( LIB_VERSION_INFO
"${LIB_VERSION_CURRENT}.${LIB_VERSION_AGE}.${LIB_VERSION_REVISION}" )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/README.md new/fluidsynth-2.3.1/README.md
--- old/fluidsynth-2.3.0/README.md 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/README.md 2022-12-28 12:43:59.000000000 +0100
@@ -14,7 +14,7 @@
FluidSynth generates audio by reading and handling MIDI events from MIDI input devices by using a [SoundFont](https://github.com/FluidSynth/fluidsynth/wiki/SoundFont). It is the software analogue of a MIDI synthesizer. FluidSynth can also play MIDI files.
-[![SonarQube Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=FluidSynth_fluidsynth&metric=alert_status)](https://sonarcloud.io/dashboard?id=FluidSynth_fluidsynth) [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/FluidSynth/fluidsynth.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/FluidSynth/fluidsynth/context:cpp) [![OHLOH Project Stats](https://www.openhub.net/p/fluidsynth/widgets/project_thin_badge?format=gif)](https://www.openhub.net/p/fluidsynth)
+[![SonarQube Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=FluidSynth_fluidsynth&metric=alert_status)](https://sonarcloud.io/dashboard?id=FluidSynth_fluidsynth) [![OHLOH Project Stats](https://www.openhub.net/p/fluidsynth/widgets/project_thin_badge?format=gif)](https://www.openhub.net/p/fluidsynth)
## Documentation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/cmake_admin/FluidUnitTest.cmake new/fluidsynth-2.3.1/cmake_admin/FluidUnitTest.cmake
--- old/fluidsynth-2.3.0/cmake_admin/FluidUnitTest.cmake 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/cmake_admin/FluidUnitTest.cmake 2022-12-28 12:43:59.000000000 +0100
@@ -13,9 +13,9 @@
# use the local include path to look for fluidsynth.h, as we cannot be sure fluidsynth is already installed
target_include_directories(${_test}
PUBLIC
- $ # include auto generated headers
- $ # include "normal" public (sub-)headers
- $ # include private headers
+ $ # include auto generated headers
+ $ # include "normal" public (sub-)headers
+ $ # include private headers
$ # include all other header search paths needed by libfluidsynth (esp. glib)
)
@@ -34,7 +34,7 @@
set_target_properties(${_util} PROPERTIES EXCLUDE_FROM_ALL TRUE)
# append no-op generator expression to avoid VS or XCode from adding per-config subdirectories
- set_target_properties(${_util} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/test/utils/$<0:>)
+ set_target_properties(${_util} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/test/utils/$<0:>)
# import necessary compile flags and dependency libraries
if ( FLUID_CPPFLAGS )
@@ -45,9 +45,9 @@
# use the local include path to look for fluidsynth.h, as we cannot be sure fluidsynth is already installed
target_include_directories(${_util}
PUBLIC
- $ # include auto generated headers
- $ # include "normal" public (sub-)headers
- $ # include private headers
+ $ # include auto generated headers
+ $ # include "normal" public (sub-)headers
+ $ # include private headers
$ # include all other header search paths needed by libfluidsynth (esp. glib)
)
@@ -61,25 +61,38 @@
# the content with the file given in _expected_output
macro ( ADD_FLUID_SF_DUMP_TEST _sfname)
- set( test_args "${CMAKE_SOURCE_DIR}/sf2/${_sfname} ${_sfname}.yml" )
+ set( test_args "${PROJECT_SOURCE_DIR}/sf2/${_sfname} ${_sfname}.yml" )
ADD_TEST(${_sfname}_dump_test
${CMAKE_COMMAND}
- -Dtest_cmd=${CMAKE_BINARY_DIR}/test/utils/dump_sfont${CMAKE_EXECUTABLE_SUFFIX}
+ -Dtest_cmd=${PROJECT_BINARY_DIR}/test/utils/dump_sfont${CMAKE_EXECUTABLE_SUFFIX}
-Dtest_args=${test_args}
-Dtest_output=${_sfname}.yml
- -Dexpected_output=${CMAKE_SOURCE_DIR}/sf2/${_sfname}.yml
- -P ${CMAKE_SOURCE_DIR}/cmake_admin/RunOutputTest.cmake
+ -Dexpected_output=${PROJECT_SOURCE_DIR}/sf2/${_sfname}.yml
+ -P ${PROJECT_SOURCE_DIR}/cmake_admin/RunOutputTest.cmake
)
endmacro ( ADD_FLUID_SF_DUMP_TEST )
macro ( ADD_FLUID_DEMO _demo )
- ADD_EXECUTABLE(${_demo} ${_demo}.c )
+
+ if ( ${ARGC} GREATER 1 )
+ string( TOLOWER "${ARGV1}" _LANGEXT )
+ else ()
+ set( _LANGEXT "c" )
+ endif ()
+
+ ADD_EXECUTABLE(${_demo} ${_demo}.${_LANGEXT} )
# only build this unit test when explicitly requested by "make check"
set_target_properties(${_demo} PROPERTIES EXCLUDE_FROM_ALL TRUE)
+ # request C++11 features only for the C++ example(s)
+ if ( "${_LANGEXT}" STREQUAL "cxx" )
+ target_compile_features( ${_demo} PUBLIC cxx_std_11 )
+ set_target_properties( ${_demo} PROPERTIES CXX_EXTENSIONS OFF )
+ endif()
+
# import necessary compile flags and dependency libraries
if ( FLUID_CPPFLAGS )
set_target_properties ( ${_demo} PROPERTIES COMPILE_FLAGS ${FLUID_CPPFLAGS} )
@@ -89,9 +102,9 @@
# use the local include path to look for fluidsynth.h, as we cannot be sure fluidsynth is already installed
target_include_directories(${_demo}
PUBLIC
- $ # include auto generated headers
- $ # include "normal" public (sub-)headers
- $ # include all other header search paths needed by libfluidsynth (esp. glib)
+ $ # include auto generated headers
+ $ # include "normal" public (sub-)headers
+ $ # include all other header search paths needed by libfluidsynth (esp. glib)
)
# append the current unit test to check-target as dependency
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/doc/examples/CMakeLists.txt new/fluidsynth-2.3.1/doc/examples/CMakeLists.txt
--- old/fluidsynth-2.3.0/doc/examples/CMakeLists.txt 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/doc/examples/CMakeLists.txt 2022-12-28 12:43:59.000000000 +0100
@@ -27,4 +27,5 @@
ADD_FLUID_DEMO ( fluidsynth_fx )
ADD_FLUID_DEMO ( fluidsynth_metronome )
ADD_FLUID_DEMO ( fluidsynth_simple )
-
+ADD_FLUID_DEMO ( fluidsynth_instruments )
+ADD_FLUID_DEMO ( fluidsynth_enumsettings CXX )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/doc/examples/fluidsynth_enumsettings.cxx new/fluidsynth-2.3.1/doc/examples/fluidsynth_enumsettings.cxx
--- old/fluidsynth-2.3.0/doc/examples/fluidsynth_enumsettings.cxx 1970-01-01 01:00:00.000000000 +0100
+++ new/fluidsynth-2.3.1/doc/examples/fluidsynth_enumsettings.cxx 2022-12-28 12:43:59.000000000 +0100
@@ -0,0 +1,97 @@
+/* FluidSynth Enum Settings - An example of using fluidsynth in C++
+ * This source uses C++11 features (nullptr, lambda expressions, ...)
+ *
+ * This code is in the public domain.
+ *
+ * To compile:
+ * g++ -o fluidsynth_enumsettings -lfluidsynth fluidsynth_enumsettings.cpp
+ *
+ * To run:
+ * fluidsynth_enumsettings
+ *
+ * [Pedro L��pez-Cabanillas ]
+ */
+
+#include <list>
+#include <string>
+#include <iostream>
+#include <iomanip>
+#include
+
+int main(int argc, char**)
+{
+ fluid_settings_t* settings = nullptr;
+ void* context = nullptr;
+
+ std::cout << "C++ enum settings of FluidSynth v" << fluid_version_str() << std::endl;
+
+ if (argc > 1) {
+ std::cerr << "Usage: fluidsynth_enumsettings" << std::endl;
+ return 1;
+ }
+
+ /* Create the settings object. This example uses the default values for the settings. */
+ settings = new_fluid_settings();
+ if (settings == NULL) {
+ std::cerr << "Failed to create the settings" << std::endl;
+ return 2;
+ }
+
+ std::cout << std::left << std::setw(35) << "Setting" << std::setw(16) << "Type" << std::setw(16) << "Value" << "Options" << std::endl;
+ std::cout << std::left << std::setw(35) << "-------" << std::setw(16) << "----" << std::setw(16) << "-----" << "-------" << std::endl;
+
+ context = settings;
+ fluid_settings_foreach(settings, context, [](void *inner_context, const char *name, int type) {
+ int ok = 0;
+ double dValue{0.0};
+ int iValue{0};
+ char *psValue = nullptr;
+ fluid_settings_t* inner_settings = (fluid_settings_t*) inner_context;
+ std::cout << std::left << std::setw(35) << name;
+ switch (type) {
+ case FLUID_NO_TYPE:
+ std::cout << std::setw(16) << "Undefined";
+ break;
+ case FLUID_NUM_TYPE:
+ ok = fluid_settings_getnum(inner_settings, name, &dValue);
+ if (ok == FLUID_OK) {
+ std::cout << std::setw(16) << "Numeric" << std::setw(16) << dValue;
+ }
+ break;
+ case FLUID_INT_TYPE:
+ ok = fluid_settings_getint(inner_settings, name, &iValue);
+ if (ok == FLUID_OK) {
+ std::cout << std::setw(16) << "Integer" << std::setw(16) << iValue;
+ }
+ break;
+ case FLUID_STR_TYPE:
+ ok = fluid_settings_dupstr(inner_settings, name, &psValue);
+ if (ok == FLUID_OK) {
+ std::cout << std::setw(16) << "String" << std::setw(16) << psValue;
+ fluid_free(psValue);
+ }
+ break;
+ case FLUID_SET_TYPE:
+ std::cout << std::setw(16) << "Set";
+ break;
+ }
+ std::liststd::string options;
+ fluid_settings_foreach_option(inner_settings, name, &options, [](void *context2, const char *, const char *option2){
+ std::liststd::string *options_list = (std::liststd::string *) context2;
+ if (!options_list->empty()) {
+ options_list->push_back(", ");
+ }
+ options_list->push_back(option2);
+ });
+ if (!options.empty()) {
+ for(auto it=options.begin(); it != options.end(); ++it) {
+ std::cout << *it;
+ }
+ }
+ std::cout << std::endl;
+ });
+ std::cout << "done" << std::endl;
+
+ delete_fluid_settings(settings);
+ return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/doc/examples/fluidsynth_instruments.c new/fluidsynth-2.3.1/doc/examples/fluidsynth_instruments.c
--- old/fluidsynth-2.3.0/doc/examples/fluidsynth_instruments.c 1970-01-01 01:00:00.000000000 +0100
+++ new/fluidsynth-2.3.1/doc/examples/fluidsynth_instruments.c 2022-12-28 12:43:59.000000000 +0100
@@ -0,0 +1,77 @@
+/* FluidSynth Instruments - An example of using fluidsynth >= 2.x
+ *
+ * This code is in the public domain.
+ *
+ * To compile:
+ * gcc -o fluidsynth_instruments fluidsynth_instruments.c -lfluidsynth
+ *
+ * To run:
+ * fluidsynth_instruments soundfont
+ *
+ * [Pedro L��pez-Cabanillas ]
+ */
+
+#include
+#include
+
+int main(int argc, char** argv)
+{
+ fluid_settings_t* settings = NULL;
+ fluid_synth_t* synth = NULL;
+ fluid_sfont_t* sfont = NULL;
+ int err = 0, sfid = -1;
+
+ if (argc != 2) {
+ fprintf(stderr, "Usage: fluidsynth_instr [soundfont]\n");
+ return 1;
+ }
+
+ /* Create the settings object. This example uses the default
+ * values for the settings. */
+ settings = new_fluid_settings();
+ if (settings == NULL) {
+ fprintf(stderr, "Failed to create the settings\n");
+ err = 2;
+ goto cleanup;
+ }
+
+ /* Create the synthesizer */
+ synth = new_fluid_synth(settings);
+ if (synth == NULL) {
+ fprintf(stderr, "Failed to create the synthesizer\n");
+ err = 3;
+ goto cleanup;
+ }
+
+ /* Load the soundfont */
+ sfid = fluid_synth_sfload(synth, argv[1], 1);
+ if (sfid == -1) {
+ fprintf(stderr, "Failed to load the SoundFont\n");
+ err = 4;
+ goto cleanup;
+ }
+
+ /* Enumeration of banks and programs */
+ sfont = fluid_synth_get_sfont_by_id(synth, sfid);
+ if (sfont != NULL) {
+ fluid_preset_t *preset;
+ fluid_sfont_iteration_start(sfont);
+ while ((preset = fluid_sfont_iteration_next(sfont)) != NULL) {
+ int bank = fluid_preset_get_banknum(preset);
+ int prog = fluid_preset_get_num(preset);
+ const char* name = fluid_preset_get_name(preset);
+ printf("bank: %d prog: %d name: %s\n", bank, prog, name);
+ }
+ }
+
+ printf("done\n");
+
+ cleanup:
+ if (synth) {
+ delete_fluid_synth(synth);
+ }
+ if (settings) {
+ delete_fluid_settings(settings);
+ }
+ return err;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/doc/fluidsettings.xml new/fluidsynth-2.3.1/doc/fluidsettings.xml
--- old/fluidsynth-2.3.0/doc/fluidsettings.xml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/doc/fluidsettings.xml 2022-12-28 12:43:59.000000000 +0100
@@ -179,7 +179,7 @@
<ul>
<li>gs: (default) CC0 becomes the bank number, CC32 is ignored.</li>
<li>gm: ignores CC0 and CC32 messages.</li>
- <li>xg: CC32 becomes the bank number, CC0 toggles between melodic or drum channel.</li>
+ <li>xg: if CC0<120 then channel is set to melodic and CC32 is the bank number. If CC0>=120 then channel is set to drum and the bank number is set to 128 (CC32 is ignored).</li>
<li>mma: bank is calculated as CC0*128+CC32.</li>
</ul>
</desc>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/doc/fluidsynth-v20-devdoc.txt new/fluidsynth-2.3.1/doc/fluidsynth-v20-devdoc.txt
--- old/fluidsynth-2.3.0/doc/fluidsynth-v20-devdoc.txt 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/doc/fluidsynth-v20-devdoc.txt 2022-12-28 12:43:59.000000000 +0100
@@ -8,8 +8,8 @@
\author David Henningsson
\author Tom Moebert
\author Copyright © 2003-2022 Peter Hanappe, Conrad Berh��rster, Antoine Schmitt, Pedro L��pez-Cabanillas, Josh Green, David Henningsson, Tom Moebert
-\version Revision 2.3.0
-\date 2022-09-19
+\version Revision 2.3.1
+\date 2022-12-28
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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/doc/ladspa.md new/fluidsynth-2.3.1/doc/ladspa.md
--- old/fluidsynth-2.3.0/doc/ladspa.md 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/doc/ladspa.md 2022-12-28 12:43:59.000000000 +0100
@@ -99,10 +99,11 @@
mono effect send signals (as determined by the reverb and chorus send
generators for each voice) into the LADSPA effects.
-Please note that if you run FluidSynth with the internal reverb and chorus
-effects active (which is the default), then those effects are already mixed
-into the Main:L and Main:R channels. Fore more details, please see the "Signal
-Flow" section below.
+Please note that if you run FluidSynth 2.3.0 with the internal reverb and chorus
+effects active (which is the default), then those effects are mixed
+into the Main:L and Main:R channels after LADSPA has been invoked. Before FluidSynth 2.3.0
+the internal effects had been already mixed into Main channels at the time when LADSPA is invoked.
+Fore more details, please see the "Signal Flow" section below.
For host port setups in multi-channel configurations, please see the
"Multi-Channel Output" section below.
@@ -210,7 +211,7 @@
# Signal Flow
-The LADSPA effects unit runs immediately after the internal reverb and chorus
+The LADSPA effects unit runs immediately before the internal reverb and chorus
effects have been processed. When no effects have been configured, the LADSPA
engine is dormant and uses no additional system resources.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/fluidsynth.conf.in new/fluidsynth-2.3.1/fluidsynth.conf.in
--- old/fluidsynth-2.3.0/fluidsynth.conf.in 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/fluidsynth.conf.in 2022-12-28 12:43:59.000000000 +0100
@@ -2,4 +2,4 @@
#SOUND_FONT=@DEFAULT_SOUNDFONT@
# Additional optional parameters (may be useful, see 'man fluidsynth' for further info)
-#OTHER_OPTS='-a alsa -m alsa_seq -r 48000'
+#OTHER_OPTS='-a alsa -m alsa_seq -p FluidSynth\ GM -r 48000'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/fluidsynth.service.in new/fluidsynth-2.3.1/fluidsynth.service.in
--- old/fluidsynth-2.3.0/fluidsynth.service.in 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/fluidsynth.service.in 2022-12-28 12:43:59.000000000 +0100
@@ -2,9 +2,21 @@
Description=FluidSynth Daemon
Documentation=man:fluidsynth(1)
After=sound.target
+After=pipewire.service
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
+ProtectHome=read-only
+ProtectHostname=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+# end of automatic additions
+# required in order for the above sandboxing options to work on a user unit
+PrivateUsers=yes
Type=notify
NotifyAccess=main
EnvironmentFile=@FLUID_DAEMON_ENV_FILE@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/audio.h new/fluidsynth-2.3.1/include/fluidsynth/audio.h
--- old/fluidsynth-2.3.0/include/fluidsynth/audio.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/audio.h 2022-12-28 12:43:59.000000000 +0100
@@ -120,7 +120,7 @@
/** @endlifecycle */
FLUIDSYNTH_API int fluid_audio_driver_register(const char **adrivers);
-/* @} */
+/** @} */
/**
* @defgroup file_renderer File Renderer
@@ -146,7 +146,7 @@
FLUIDSYNTH_API int fluid_file_renderer_process_block(fluid_file_renderer_t *dev);
FLUIDSYNTH_API int fluid_file_set_encoding_quality(fluid_file_renderer_t *dev, double q);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/event.h new/fluidsynth-2.3.1/include/fluidsynth/event.h
--- old/fluidsynth-2.3.0/include/fluidsynth/event.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/event.h 2022-12-28 12:43:59.000000000 +0100
@@ -135,7 +135,7 @@
FLUIDSYNTH_API int fluid_event_get_pitch(fluid_event_t *evt);
FLUIDSYNTH_API double fluid_event_get_scale(fluid_event_t *evt);
FLUIDSYNTH_API unsigned int fluid_event_get_sfont_id(fluid_event_t *evt);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/gen.h new/fluidsynth-2.3.1/include/fluidsynth/gen.h
--- old/fluidsynth-2.3.0/include/fluidsynth/gen.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/gen.h 2022-12-28 12:43:59.000000000 +0100
@@ -125,7 +125,7 @@
@warning This symbol is not part of the public API and ABI
stability guarantee and may change at any time! */
};
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/ladspa.h new/fluidsynth-2.3.1/include/fluidsynth/ladspa.h
--- old/fluidsynth-2.3.0/include/fluidsynth/ladspa.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/ladspa.h 2022-12-28 12:43:59.000000000 +0100
@@ -59,7 +59,7 @@
const char *port_name, float val);
FLUIDSYNTH_API int fluid_ladspa_effect_link(fluid_ladspa_fx_t *fx, const char *effect_name,
const char *port_name, const char *name);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/log.h new/fluidsynth-2.3.1/include/fluidsynth/log.h
--- old/fluidsynth-2.3.0/include/fluidsynth/log.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/log.h 2022-12-28 12:43:59.000000000 +0100
@@ -88,7 +88,7 @@
__attribute__ ((format (printf, 2, 3)))
#endif
;
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/midi.h new/fluidsynth-2.3.1/include/fluidsynth/midi.h
--- old/fluidsynth-2.3.0/include/fluidsynth/midi.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/midi.h 2022-12-28 12:43:59.000000000 +0100
@@ -93,7 +93,7 @@
* @endcode
*/
typedef int (*handle_midi_tick_func_t)(void *data, int tick);
-/* @} */
+/** @} */
/**
* @defgroup midi_events MIDI Events
@@ -139,7 +139,7 @@
void *data, int size, int dynamic);
FLUIDSYNTH_API int fluid_midi_event_get_lyrics(fluid_midi_event_t *evt,
void **data, int *size);
-/* @} */
+/** @} */
/**
* @defgroup midi_router MIDI Router
@@ -196,7 +196,7 @@
FLUIDSYNTH_API int fluid_midi_router_handle_midi_event(void *data, fluid_midi_event_t *event);
FLUIDSYNTH_API int fluid_midi_dump_prerouter(void *data, fluid_midi_event_t *event);
FLUIDSYNTH_API int fluid_midi_dump_postrouter(void *data, fluid_midi_event_t *event);
-/* @} */
+/** @} */
/**
* @defgroup midi_driver MIDI Driver
@@ -227,7 +227,7 @@
FLUIDSYNTH_API void delete_fluid_midi_driver(fluid_midi_driver_t *driver);
/** @endlifecycle */
-/* @} */
+/** @} */
/**
* @defgroup midi_player MIDI File Player
@@ -285,7 +285,7 @@
FLUIDSYNTH_API int fluid_player_get_bpm(fluid_player_t *player);
FLUIDSYNTH_API int fluid_player_get_midi_tempo(fluid_player_t *player);
FLUIDSYNTH_API int fluid_player_seek(fluid_player_t *player, int ticks);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/misc.h new/fluidsynth-2.3.1/include/fluidsynth/misc.h
--- old/fluidsynth-2.3.0/include/fluidsynth/misc.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/misc.h 2022-12-28 12:43:59.000000000 +0100
@@ -68,7 +68,7 @@
FLUIDSYNTH_API int fluid_is_soundfont(const char *filename);
FLUIDSYNTH_API int fluid_is_midifile(const char *filename);
FLUIDSYNTH_API void fluid_free(void* ptr);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/mod.h new/fluidsynth-2.3.1/include/fluidsynth/mod.h
--- old/fluidsynth-2.3.0/include/fluidsynth/mod.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/mod.h 2022-12-28 12:43:59.000000000 +0100
@@ -96,7 +96,7 @@
FLUIDSYNTH_API int fluid_mod_has_dest(const fluid_mod_t *mod, int gen);
FLUIDSYNTH_API void fluid_mod_clone(fluid_mod_t *mod, const fluid_mod_t *src);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/seq.h new/fluidsynth-2.3.1/include/fluidsynth/seq.h
--- old/fluidsynth-2.3.0/include/fluidsynth/seq.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/seq.h 2022-12-28 12:43:59.000000000 +0100
@@ -83,7 +83,7 @@
FLUIDSYNTH_API unsigned int fluid_sequencer_get_tick(fluid_sequencer_t *seq);
FLUIDSYNTH_API void fluid_sequencer_set_time_scale(fluid_sequencer_t *seq, double scale);
FLUIDSYNTH_API double fluid_sequencer_get_time_scale(fluid_sequencer_t *seq);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/seqbind.h new/fluidsynth-2.3.1/include/fluidsynth/seqbind.h
--- old/fluidsynth-2.3.0/include/fluidsynth/seqbind.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/seqbind.h 2022-12-28 12:43:59.000000000 +0100
@@ -36,7 +36,7 @@
fluid_seq_id_t fluid_sequencer_register_fluidsynth(fluid_sequencer_t *seq, fluid_synth_t *synth);
FLUIDSYNTH_API
int fluid_sequencer_add_midi_event_to_buffer(void *data, fluid_midi_event_t *event);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/settings.h new/fluidsynth-2.3.1/include/fluidsynth/settings.h
--- old/fluidsynth-2.3.0/include/fluidsynth/settings.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/settings.h 2022-12-28 12:43:59.000000000 +0100
@@ -185,7 +185,7 @@
FLUIDSYNTH_API
void fluid_settings_foreach(fluid_settings_t *settings, void *data,
fluid_settings_foreach_t func);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/sfont.h new/fluidsynth-2.3.1/include/fluidsynth/sfont.h
--- old/fluidsynth-2.3.0/include/fluidsynth/sfont.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/sfont.h 2022-12-28 12:43:59.000000000 +0100
@@ -353,7 +353,7 @@
FLUIDSYNTH_API int fluid_sample_set_loop(fluid_sample_t *sample, unsigned int loop_start, unsigned int loop_end);
FLUIDSYNTH_API int fluid_sample_set_pitch(fluid_sample_t *sample, int root_key, int fine_tune);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/shell.h new/fluidsynth-2.3.1/include/fluidsynth/shell.h
--- old/fluidsynth-2.3.0/include/fluidsynth/shell.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/shell.h 2022-12-28 12:43:59.000000000 +0100
@@ -47,7 +47,7 @@
FLUIDSYNTH_API fluid_ostream_t fluid_get_stdout(void);
FLUIDSYNTH_API char *fluid_get_userconf(char *buf, int len);
FLUIDSYNTH_API char *fluid_get_sysconf(char *buf, int len);
-/* @} */
+/** @} */
/**
@@ -78,7 +78,7 @@
FLUIDSYNTH_API
int fluid_source(fluid_cmd_handler_t *handler, const char *filename);
-/* @} */
+/** @} */
/**
@@ -106,7 +106,7 @@
FLUIDSYNTH_API void delete_fluid_shell(fluid_shell_t *shell);
/** @endlifecycle */
-/* @} */
+/** @} */
/**
@@ -141,7 +141,7 @@
FLUIDSYNTH_API int fluid_server_join(fluid_server_t *server);
/** @endlifecycle */
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/synth.h new/fluidsynth-2.3.1/include/fluidsynth/synth.h
--- old/fluidsynth-2.3.0/include/fluidsynth/synth.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/synth.h 2022-12-28 12:43:59.000000000 +0100
@@ -55,7 +55,7 @@
FLUIDSYNTH_API double fluid_synth_get_cpu_load(fluid_synth_t *synth);
FLUID_DEPRECATED FLUIDSYNTH_API const char *fluid_synth_error(fluid_synth_t *synth);
-/* @} */
+/** @} */
/**
* @defgroup midi_messages MIDI Channel Messages
@@ -102,7 +102,7 @@
FLUIDSYNTH_API int fluid_synth_set_gen(fluid_synth_t *synth, int chan,
int param, float value);
FLUIDSYNTH_API float fluid_synth_get_gen(fluid_synth_t *synth, int chan, int param);
-/* @} MIDI Channel Messages */
+/** @} MIDI Channel Messages */
/**
@@ -124,7 +124,7 @@
FLUIDSYNTH_API void fluid_synth_start_voice(fluid_synth_t *synth, fluid_voice_t *voice);
FLUIDSYNTH_API void fluid_synth_get_voicelist(fluid_synth_t *synth,
fluid_voice_t *buf[], int bufsize, int ID);
-/* @} Voice Control */
+/** @} Voice Control */
/**
@@ -148,7 +148,7 @@
const char *name);
FLUIDSYNTH_API int fluid_synth_set_bank_offset(fluid_synth_t *synth, int sfont_id, int offset);
FLUIDSYNTH_API int fluid_synth_get_bank_offset(fluid_synth_t *synth, int sfont_id);
-/* @} Soundfont Management */
+/** @} Soundfont Management */
/**
@@ -183,7 +183,7 @@
FLUIDSYNTH_API int fluid_synth_get_reverb_group_damp(fluid_synth_t *synth, int fx_group, double *damping);
FLUIDSYNTH_API int fluid_synth_get_reverb_group_width(fluid_synth_t *synth, int fx_group, double *width);
FLUIDSYNTH_API int fluid_synth_get_reverb_group_level(fluid_synth_t *synth, int fx_group, double *level);
- /* @} Reverb */
+ /** @} Reverb */
/**
@@ -233,7 +233,7 @@
FLUIDSYNTH_API int fluid_synth_get_chorus_group_speed(fluid_synth_t *synth, int fx_group, double *speed);
FLUIDSYNTH_API int fluid_synth_get_chorus_group_depth(fluid_synth_t *synth, int fx_group, double *depth_ms);
FLUIDSYNTH_API int fluid_synth_get_chorus_group_type(fluid_synth_t *synth, int fx_group, int *type);
-/* @} Chorus */
+/** @} Chorus */
/**
* @defgroup synthesis_params Synthesis Parameters
@@ -286,7 +286,7 @@
FLUIDSYNTH_API int fluid_synth_add_default_mod(fluid_synth_t *synth, const fluid_mod_t *mod, int mode);
FLUIDSYNTH_API int fluid_synth_remove_default_mod(fluid_synth_t *synth, const fluid_mod_t *mod);
-/* @} Synthesis Parameters */
+/** @} Synthesis Parameters */
/**
@@ -316,7 +316,7 @@
int fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog);
FLUIDSYNTH_API int fluid_synth_tuning_dump(fluid_synth_t *synth, int bank, int prog,
char *name, int len, double *pitch);
-/* @} MIDI Tuning */
+/** @} MIDI Tuning */
/**
@@ -357,7 +357,7 @@
FLUIDSYNTH_API int fluid_synth_process(fluid_synth_t *synth, int len,
int nfx, float *fx[],
int nout, float *out[]);
-/* @} Audio Rendering */
+/** @} Audio Rendering */
/**
@@ -391,7 +391,7 @@
};
FLUIDSYNTH_API int fluid_synth_set_custom_filter(fluid_synth_t *, int type, int flags);
-/* @} IIR Filter */
+/** @} IIR Filter */
@@ -519,7 +519,7 @@
FLUIDSYNTH_API int fluid_synth_get_breath_mode(fluid_synth_t *synth,
int chan, int *breathmode);
/** @} Breath Mode */
-/* @} MIDI Channel Setup */
+/** @} MIDI Channel Setup */
/** @ingroup settings */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/types.h new/fluidsynth-2.3.1/include/fluidsynth/types.h
--- old/fluidsynth-2.3.0/include/fluidsynth/types.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/types.h 2022-12-28 12:43:59.000000000 +0100
@@ -76,7 +76,7 @@
typedef long long fluid_long_long_t;
#endif
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/version.h.in new/fluidsynth-2.3.1/include/fluidsynth/version.h.in
--- old/fluidsynth-2.3.0/include/fluidsynth/version.h.in 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/version.h.in 2022-12-28 12:43:59.000000000 +0100
@@ -38,7 +38,7 @@
FLUIDSYNTH_API void fluid_version(int *major, int *minor, int *micro);
FLUIDSYNTH_API char* fluid_version_str(void);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/voice.h new/fluidsynth-2.3.1/include/fluidsynth/voice.h
--- old/fluidsynth-2.3.0/include/fluidsynth/voice.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/voice.h 2022-12-28 12:43:59.000000000 +0100
@@ -68,7 +68,7 @@
FLUIDSYNTH_API int fluid_voice_is_sostenuto(const fluid_voice_t *voice);
FLUIDSYNTH_API int fluid_voice_optimize_sample(fluid_sample_t *s);
FLUIDSYNTH_API void fluid_voice_update_param(fluid_voice_t *voice, int gen);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/drivers/fluid_alsa.c new/fluidsynth-2.3.1/src/drivers/fluid_alsa.c
--- old/fluidsynth-2.3.0/src/drivers/fluid_alsa.c 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/drivers/fluid_alsa.c 2022-12-28 12:43:59.000000000 +0100
@@ -645,7 +645,7 @@
while((err == 0) && (card >= 0))
{
int device = -1;
- snd_ctl_t *ctl;
+ snd_ctl_t *ctl = NULL;
char card_name[32];
FLUID_SNPRINTF(card_name, sizeof(card_name), "hw:%d", card);
@@ -707,7 +707,12 @@
}
}
- snd_ctl_close(ctl);
+ if(ctl)
+ {
+ snd_ctl_close(ctl);
+ ctl = NULL;
+ }
+
err = snd_card_next(&card);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/gentables/gen_conv.c new/fluidsynth-2.3.1/src/gentables/gen_conv.c
--- old/fluidsynth-2.3.0/src/gentables/gen_conv.c 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/gentables/gen_conv.c 2022-12-28 12:43:59.000000000 +0100
@@ -18,14 +18,14 @@
static void fluid_conversion_config(void)
{
int i;
- double x;
+ long double x;
for(i = 0; i < FLUID_CENTS_HZ_SIZE; i++)
{
// 6,875 is just a factor that we already multiply into the lookup table to save
// that multiplication in fluid_ct2hz_real()
// 6.875 Hz because 440Hz / 2^6
- fluid_ct2hz_tab[i] = 6.875 * powl(2.0, (double) i / 1200.0);
+ fluid_ct2hz_tab[i] = 6.875L * powl(2.0L, i / 1200.0L);
}
/* centibels to amplitude conversion
@@ -35,7 +35,7 @@
*/
for(i = 0; i < FLUID_CB_AMP_SIZE; i++)
{
- fluid_cb2amp_tab[i] = powl(10.0, (double) i / -200.0);
+ fluid_cb2amp_tab[i] = powl(10.0L, i / -200.0L);
}
/* initialize the conversion tables (see fluid_mod.c
@@ -54,17 +54,17 @@
for(i = 1; i < FLUID_VEL_CB_SIZE - 1; i++)
{
- x = (-200.0 / FLUID_PEAK_ATTENUATION) * log((double)(i * i) / ((FLUID_VEL_CB_SIZE - 1) * (FLUID_VEL_CB_SIZE - 1))) / M_LN10;
- fluid_convex_tab[i] = (1.0 - x);
+ x = (-200.0L * 2 / FLUID_PEAK_ATTENUATION) * logl(i / (FLUID_VEL_CB_SIZE - 1.0L)) / M_LN10;
+ fluid_convex_tab[i] = (1.0L - x);
fluid_concave_tab[(FLUID_VEL_CB_SIZE - 1) - i] = x;
}
/* initialize the pan conversion table */
- x = M_PI / 2.0 / (FLUID_PAN_SIZE - 1.0);
+ x = M_PI / 2.0L / (FLUID_PAN_SIZE - 1.0L);
for(i = 0; i < FLUID_PAN_SIZE; i++)
{
- fluid_pan_tab[i] = sin(i * x);
+ fluid_pan_tab[i] = sinl(i * x);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/midi/fluid_midi.c new/fluidsynth-2.3.1/src/midi/fluid_midi.c
--- old/fluidsynth-2.3.0/src/midi/fluid_midi.c 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/midi/fluid_midi.c 2022-12-28 12:43:59.000000000 +0100
@@ -1687,6 +1687,8 @@
player->deltatime = 4.0;
player->cur_msec = 0;
player->cur_ticks = 0;
+ player->end_msec = -1;
+ player->end_pedals_disabled = 0;
player->last_callback_ticks = -1;
fluid_atomic_int_set(&player->seek_ticks, -1);
fluid_player_set_playback_callback(player, fluid_synth_handle_midi_event, synth);
@@ -2177,6 +2179,36 @@
fluid_atomic_int_set(&player->seek_ticks, -1); /* clear seek_ticks */
}
+ /* Once we've run out of MIDI events, keep playing until no voices are active */
+ if(status == FLUID_PLAYER_DONE && fluid_synth_get_active_voice_count(player->synth) > 0)
+ {
+ /* The first time we notice we've run out of MIDI events but there are still active voices, disable all hold pedals */
+ if(!player->end_pedals_disabled)
+ {
+ for(i = 0; i < synth->midi_channels; i++)
+ {
+ fluid_synth_cc(player->synth, i, SUSTAIN_SWITCH, 0);
+ fluid_synth_cc(player->synth, i, SOSTENUTO_SWITCH, 0);
+ }
+
+ player->end_pedals_disabled = 1;
+ }
+
+ status = FLUID_PLAYER_PLAYING;
+ }
+
+ /* Once no voices are active, if end_msec hasn't been scheduled, schedule it so we wait for reverb, etc to finish */
+ if(status == FLUID_PLAYER_DONE && player->end_msec < 0)
+ {
+ player->end_msec = msec + FLUID_PLAYER_STOP_GRACE_MS;
+ }
+ /* If end_msec has been scheduled and is in the future, keep playing */
+ if (player->end_msec >= 0 && msec < (unsigned int) player->end_msec)
+ {
+ status = FLUID_PLAYER_PLAYING;
+ }
+
+ /* Once there's no reason to keep playing, we're actually done */
if(status == FLUID_PLAYER_DONE)
{
FLUID_LOG(FLUID_DBG, "%s: %d: Duration=%.3f sec", __FILE__,
@@ -2225,12 +2257,15 @@
fluid_sample_timer_reset(player->synth, player->sample_timer);
}
- /* If we're at the end of the playlist and there are no loops left, loop once */
- if(player->currentfile == NULL && player->loop == 0)
- {
- player->loop = 1;
- }
-
+ /* If we're at the end of the playlist and there are no loops left, loop once */
+ if(player->currentfile == NULL && player->loop == 0)
+ {
+ player->loop = 1;
+ }
+
+ player->end_msec = -1;
+ player->end_pedals_disabled = 0;
+
fluid_atomic_int_set(&player->status, FLUID_PLAYER_PLAYING);
return FLUID_OK;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/midi/fluid_midi.h new/fluidsynth-2.3.1/src/midi/fluid_midi.h
--- old/fluidsynth-2.3.0/src/midi/fluid_midi.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/midi/fluid_midi.h 2022-12-28 12:43:59.000000000 +0100
@@ -306,6 +306,8 @@
int begin_msec; /* the time (msec) of the beginning of the file */
int start_msec; /* the start time of the last tempo change */
int cur_msec; /* the current time */
+ int end_msec; /* when >=0, playback is extended until this time (for, e.g., reverb) */
+ char end_pedals_disabled; /* 1 once the pedals have been released after the last midi event, 0 otherwise */
/* sync mode: indicates the tempo mode the player is driven by (see fluid_player_set_tempo()):
1, the player is driven by internal tempo (miditempo). This is the default.
0, the player is driven by external tempo (exttempo)
@@ -330,6 +332,8 @@
int channel_isplaying[MAX_NUMBER_OF_CHANNELS]; /* flags indicating channels on which notes have played */
};
+#define FLUID_PLAYER_STOP_GRACE_MS 2000
+
void fluid_player_settings(fluid_settings_t *settings);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/synth/fluid_synth.c new/fluidsynth-2.3.1/src/synth/fluid_synth.c
--- old/fluidsynth-2.3.0/src/synth/fluid_synth.c 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/synth/fluid_synth.c 2022-12-28 12:43:59.000000000 +0100
@@ -1969,7 +1969,7 @@
* @param len Length of data in buffer
* @param response Buffer to store response to or NULL to ignore
* @param response_len IN/OUT parameter, in: size of response buffer, out:
- * amount of data written to response buffer (if FLUID_FAILED is returned and
+ * amount of data written to response buffer (if #FLUID_FAILED is returned and
* this value is non-zero, it indicates the response buffer is too small)
* @param handled Optional location to store boolean value if message was
* recognized and handled or not (set to TRUE if it was handled)
@@ -1977,12 +1977,20 @@
* command (useful for checking if a SYSEX message would be handled)
* @return #FLUID_OK on success, #FLUID_FAILED otherwise
* @since 1.1.0
- */
-/* SYSEX format (0xF0 and 0xF7 not passed to this function):
- * Non-realtime: 0xF0 0x7E <DeviceId> [BODY] 0xF7
- * Realtime: 0xF0 0x7F <DeviceId> [BODY] 0xF7
- * Tuning messages: 0xF0 0x7E/0x7F <DeviceId> 0x08 <sub ID2> [BODY] <ChkSum> 0xF7
- * GS DT1 messages: 0xF0 0x41 <DeviceId> 0x42 0x12 [ADDRESS (3 bytes)] [DATA] <ChkSum> 0xF7
+ * @note When Fluidsynth receives an XG System Mode ON message, it compares the @p synth 's deviceID
+ * directly with the deviceID of the SysEx message. This is contrary to the XG spec (page 42), which
+ * requires to only compare the lower nibble. However, following the XG spec seems to break drum channels
+ * for a lot of MIDI files out there and therefore we've decided for this customization. If you rely on
+ * XG System Mode ON messages, make sure to set the setting \ref settings_synth_device-id to match the
+ * deviceID provided in the SysEx message (in most cases, this will be <code>deviceID=16</code>).
+ *
+ * @code
+ * SYSEX format (0xF0 and 0xF7 bytes shall not be passed to this function):
+ * Non-realtime: 0xF0 0x7E <DeviceId> [BODY] 0xF7
+ * Realtime: 0xF0 0x7F <DeviceId> [BODY] 0xF7
+ * Tuning messages: 0xF0 0x7E/0x7F <DeviceId> 0x08 <sub ID2> [BODY] <ChkSum> 0xF7
+ * GS DT1 messages: 0xF0 0x41 <DeviceId> 0x42 0x12 [ADDRESS (3 bytes)] [DATA] <ChkSum> 0xF7
+ * @endcode
*/
int
fluid_synth_sysex(fluid_synth_t *synth, const char *data, int len,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/synth/fluid_voice.c new/fluidsynth-2.3.1/src/synth/fluid_voice.c
--- old/fluidsynth-2.3.0/src/synth/fluid_voice.c 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/synth/fluid_voice.c 2022-12-28 12:43:59.000000000 +0100
@@ -906,7 +906,7 @@
* - the delay into a sample delay
*/
fluid_clip(x, -16000.0f, 4500.0f);
- x = (4.0f * FLUID_BUFSIZE * fluid_act2hz(x) / voice->output_rate);
+ x = (4.0f * FLUID_BUFSIZE * fluid_ct2hz_real(x) / voice->output_rate);
UPDATE_RVOICE_ENVLFO_R1(fluid_lfo_set_incr, modlfo, x);
break;
@@ -917,7 +917,7 @@
* - the delay into a sample delay
*/
fluid_clip(x, -16000.0f, 4500.0f);
- x = 4.0f * FLUID_BUFSIZE * fluid_act2hz(x) / voice->output_rate;
+ x = 4.0f * FLUID_BUFSIZE * fluid_ct2hz_real(x) / voice->output_rate;
UPDATE_RVOICE_ENVLFO_R1(fluid_lfo_set_incr, viblfo, x);
break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/utils/fluid_conv.c new/fluidsynth-2.3.1/src/utils/fluid_conv.c
--- old/fluidsynth-2.3.0/src/utils/fluid_conv.c 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/utils/fluid_conv.c 2022-12-28 12:43:59.000000000 +0100
@@ -48,7 +48,7 @@
{
if(FLUID_UNLIKELY(cents < 0))
{
- return (fluid_real_t) 1.0;
+ return fluid_act2hz(cents);
}
else
{
@@ -231,10 +231,11 @@
return 6900.f + (1200.f / FLUID_M_LN2) * FLUID_LOGF(f / 440.0f));
}
*/
-fluid_real_t
-fluid_act2hz(fluid_real_t c)
+double
+fluid_act2hz(double c)
{
- return 8.176f * FLUID_POW(2.f, c / 1200.f);
+ // do not use FLUID_POW, otherwise the unit tests will fail when compiled in single precision
+ return 8.1757989156437073336828122976032719176391831357 * pow(2.f, c / 1200.f);
}
/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/utils/fluid_conv.h new/fluidsynth-2.3.1/src/utils/fluid_conv.h
--- old/fluidsynth-2.3.0/src/utils/fluid_conv.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/utils/fluid_conv.h 2022-12-28 12:43:59.000000000 +0100
@@ -31,7 +31,7 @@
fluid_real_t fluid_tc2sec_delay(fluid_real_t tc);
fluid_real_t fluid_tc2sec_attack(fluid_real_t tc);
fluid_real_t fluid_tc2sec_release(fluid_real_t tc);
-fluid_real_t fluid_act2hz(fluid_real_t c);
+double fluid_act2hz(double c);
fluid_real_t fluid_pan(fluid_real_t c, int left);
fluid_real_t fluid_balance(fluid_real_t balance, int left);
fluid_real_t fluid_concave(fluid_real_t val);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/test/test_ct2hz.c new/fluidsynth-2.3.1/test/test_ct2hz.c
--- old/fluidsynth-2.3.0/test/test_ct2hz.c 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/test/test_ct2hz.c 2022-12-28 12:43:59.000000000 +0100
@@ -1,40 +1,44 @@
#include "test.h"
#include "utils/fluid_conv.h"
+#include "utils/fluid_conv_tables.h"
#include "utils/fluid_sys.h"
// this test makes sure FLUID_SNPRINTF uses a proper C99 compliant implementation
-int float_eq(fluid_real_t x, fluid_real_t y)
+int float_eq(double x, double y)
{
- static const float EPS = 1e-5;
+ static const double EPS = 1e-3;
FLUID_LOG(FLUID_INFO, "Comparing %.9f and %.9f", x, y);
- return FLUID_FABS(x-y) < EPS;
+ return fabs(x-y) < EPS;
}
int main(void)
{
+ int i;
// 440 * 2^((x-6900)/1200) where x is the cent value given to ct2hz()
-
- TEST_ASSERT(float_eq(fluid_ct2hz_real(38099), 2.9510849101059895e10));
-
- TEST_ASSERT(float_eq(fluid_ct2hz_real(13500), 19912.12696));
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(13500), 19912.12695821317828712777723687254894626098));
TEST_ASSERT(float_eq(fluid_ct2hz_real(12900), 14080));
- TEST_ASSERT(float_eq(fluid_ct2hz_real(12899), 14071.86942));
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(12899), 14071.86942151064095341800489737387241797607));
- TEST_ASSERT(float_eq(fluid_ct2hz_real(12700), 12543.85395));
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(12700), 12543.85395141597741074238497471441611245995));
TEST_ASSERT(float_eq(fluid_ct2hz_real(6900), 440));
TEST_ASSERT(float_eq(fluid_ct2hz_real(5700), 220));
TEST_ASSERT(float_eq(fluid_ct2hz_real(4500), 110));
- TEST_ASSERT(float_eq(fluid_ct2hz_real(901), 13.75794461));
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(901), 13.7579446057151293153308979171569743434390204));
TEST_ASSERT(float_eq(fluid_ct2hz_real(900), 13.75));
- TEST_ASSERT(float_eq(fluid_ct2hz_real(899), 13.74205998));
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(899), 13.7420599819439853060722704075916722831797578));
- TEST_ASSERT(float_eq(fluid_ct2hz_real(1), 8.180522806));
- TEST_ASSERT(float_eq(fluid_ct2hz_real(0), 8.175798916)); // often referred to as Absolute zero in the SF2 spec
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(1), 8.1805228064648688650522010380302841769481091116));
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(0), 8.1757989156437073336828122976032719176391831357)); // often referred to as Absolute zero in the SF2 spec
+ // Test the entire possible range: from lowest permitted value of MODLFOFREQ up to filter fc limit
+ for(i = -16000; i < 13500; i++)
+ {
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(i), fluid_act2hz(i)));
+ }
return EXIT_SUCCESS;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/test-android/build-scripts/build-call-cmake.sh new/fluidsynth-2.3.1/test-android/build-scripts/build-call-cmake.sh
--- old/fluidsynth-2.3.0/test-android/build-scripts/build-call-cmake.sh 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/test-android/build-scripts/build-call-cmake.sh 2022-12-28 12:43:59.000000000 +0100
@@ -41,7 +41,6 @@
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_STAGING_PREFIX=${PREFIX} \
-DBUILD_SHARED_LIBS=1 \
- -DLIB_SUFFIX="" \
$parameters_cmakeArgs ..
#-DCMAKE_VERBOSE_MAKEFILE=1 \
make -j$((`nproc`+1)) || (popd && popd && exit 1)