Skip to content

Commit

Permalink
Merge branch 'master' into sans_glib
Browse files Browse the repository at this point in the history
* master: (66 commits)
  Add portamento test files
  Restore discovery of libsndfile on Ubuntu (FluidSynth#1454)
  Fix crash on startup when there are no MIDI devices  (FluidSynth#1447)
  Replace VERSIONINFO resource cmake macro (FluidSynth#1449)
  Fix filter processing order in DSP chain (FluidSynth#1444)
  Render the nervous filter with additional soundfonts
  Add Christian's SF2 spec test to regression tests
  Bump testdata ref
  Migrate test files from LFS to submodule
  Delete test files from Git LFS
  Bump to 2.4.1
  Smooth linear filter parameter change (FluidSynth#1432)
  Reenable AWE32 NRPN 23 and 24 (FluidSynth#1430)
  indentation issue
  Disable chorus for Uplift - it's too noisy in the middle part
  Add Klerg's renderings of Altitude and Uplift
  updated cmake build system * debug output for libsndfile, quieter output for pulseaudio * enhanced build summary report * revised building win32 binaries without unicode support
  add cmake output for sndfile issues
  Fix CI builds (FluidSynth#1435)
  Add test files for AWE32 NRPN (FluidSynth#1434)
  ...
  • Loading branch information
DominusExult committed Dec 27, 2024
2 parents 5387095 + 4579469 commit 5950007
Show file tree
Hide file tree
Showing 60 changed files with 1,538 additions and 714 deletions.
12 changes: 6 additions & 6 deletions .azure/azure-pipelines-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ variables:
ICONV_VERSION: '1.17'
# libffi 3.4.4 fails due to https://github.com/libffi/libffi/issues/760
FFI_VERSION: 'ce077e5565366171aa1b4438749b0922fce887a4'
GETTEXT_VERSION: '0.21'
GETTEXT_VERSION: '0.22.5'
GLIB_VERSION: '2.72'
GLIB_EXTRAVERSION: '4'
OBOE_VERSION: '1.7.0'
SNDFILE_VERSION: '1.2.0'
OBOE_VERSION: '1.9.0'
SNDFILE_VERSION: '1.2.2'
INSTPATCH_VERSION: '1.1.6'
VORBIS_VERSION: '1.3.7'
OGG_VERSION: '1.3.5'
OPUS_VERSION: '1.3.1'
FLAC_VERSION: '1.4.2'
OPUS_VERSION: '1.5.2'
FLAC_VERSION: '1.4.3'
PCRE_VERSION: '8.45'

# Android NDK sources and standalone toolchain is put here
Expand All @@ -55,7 +55,7 @@ variables:
# Must be the same as $ANDROID_NDK_HOME see:
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
# We cannot use $ANDROID_NDK_HOME because this is an environment variable, but here, we need a compile-time constant.
NDK: '/usr/local/lib/android/sdk/ndk/25.2.9519653'
NDK: '/usr/local/lib/android/sdk/ndk/27.2.12479018'

# All the built binaries, libs and their headers will be installed here
PREFIX: '$(DEV)/opt/android'
Expand Down
22 changes: 13 additions & 9 deletions .azure/azure-pipelines-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ jobs:
- job: macOS_brew
strategy:
matrix:
UnixLibs11:
imageName: 'macos-11'
UnixLibs13:
imageName: 'macOS-13'
CMakeFlags: '-Denable-framework=0'
ReadlinePkgConf: ''
UnixLibs11_static:
imageName: 'macos-11'
UnixLibs13_static:
imageName: 'macOS-13'
CMakeFlags: '-Denable-framework=0 -DBUILD_SHARED_LIBS=0'
ReadlinePkgConf: ''
UnixLibs11_static_pkgconf_readline:
imageName: 'macos-11'
UnixLibs13_static_pkgconf_readline:
imageName: 'macOS-13'
CMakeFlags: '-Denable-framework=0 -DBUILD_SHARED_LIBS=0'
ReadlinePkgConf: '$(brew --prefix readline)/lib/pkgconfig'
UnixLibs12:
Expand All @@ -50,8 +50,8 @@ jobs:
imageName: 'macos-12'
CMakeFlags: '-Denable-framework=0 -DBUILD_SHARED_LIBS=0'
ReadlinePkgConf: '$(brew --prefix readline)/lib/pkgconfig'
FrameWork11:
imageName: 'macos-11'
FrameWork13:
imageName: 'macOS-13'
CMakeFlags: ''
ReadlinePkgConf: ''
FrameWork12:
Expand Down Expand Up @@ -137,9 +137,13 @@ jobs:
# imageName: 'macos-11'
# 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-2.7.2-12-Monterey.pkg'
macPortsUrl: 'https://github.com/macports/macports-base/releases/download/v2.9.3/MacPorts-2.9.3-12-Monterey.pkg'
imageName: 'macos-12'
CMakeFlags: '-Denable-sdl2=0 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -Denable-framework=0'
13_0_universal_unixlibs:
macPortsUrl: 'https://github.com/macports/macports-base/releases/download/v2.9.3/MacPorts-2.9.3-13-Ventura.pkg'
imageName: 'macos-13'
CMakeFlags: '-Denable-sdl2=0 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -Denable-framework=0'
pool:
vmImage: $(imageName)
steps:
Expand Down
31 changes: 21 additions & 10 deletions .azure/azure-pipelines-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ jobs:
artifact-prefix: "fluidsynth"
CFLAGS: "/arch:IA32"
CXXFLAGS: "/arch:IA32"
CMAKEFLAGS: "-Denable-libinstpatch=0"
x64:
platform: x64
gtk-bundle: $(gtk-bundle-x64)
libsndfile-url: $(libsndfile-url-x64)
artifact-prefix: "fluidsynth"
CFLAGS: ""
CXXFLAGS: ""
CMAKEFLAGS: ""
pool:
vmImage: 'windows-2019'
steps:
Expand All @@ -56,22 +58,26 @@ jobs:
curl -LfsS -o libsndfile-dev.zip $(libsndfile-url) || exit -1
7z x -aos -- gtk-bundle-dev.zip > NUL || exit -1
7z x -aos -- libsndfile-dev.zip > NUL || exit -1
REM need to fix the naming of libsndfile otherwise the linker won't find it
mv lib\libsndfile-1.lib lib\sndfile.lib || exit -1
mv lib\libsndfile-1.def lib\sndfile.def || exit -1
rm *.zip
cd libsndfile-*
cp -rf * ..
cd ..
rm -rf libsndfile-*
cd $(Build.ArtifactStagingDirectory)\libinstpatch-XP-$(platform)
cp -rf * d:\deps\
mv -f * ..
cd ..
rmdir $(Build.ArtifactStagingDirectory)\libinstpatch-XP-$(platform)\
cd d:\deps
dir
DEL /F C:\Strawberry\perl\bin\pkg-config.bat
displayName: 'Prerequisites'
- script: |
@ECHO ON
SET "PATH=d:\deps\bin;%PATH%"
pkg-config --list-all
mkdir build && cd build || exit -1
cmake -Werror=dev -A $(platform) -T $(toolset) -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory) -Denable-readline=0 -Denable-floats=1 -Denable-jack=0 -Denable-sdl2=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 -Dwindows-version=0x0501 .. || exit -1
cmake -Werror=dev -A $(platform) -T $(toolset) -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory) -Denable-readline=0 -Denable-floats=1 -Denable-jack=0 -Denable-sdl2=0 $(CMAKEFLAGS) -DCMAKE_BUILD_TYPE=Release -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 -Dwindows-version=0x0501 .. || exit -1
cmake --build . --config Release --parallel 3 || exit -1
displayName: 'Compile fluidsynth'
- script: |
Expand Down Expand Up @@ -135,9 +141,13 @@ jobs:
curl -LfsS -o libsndfile-dev.zip $(libsndfile-url) || exit -1
7z x -aos -- gtk-bundle-dev.zip > NUL || exit -1
7z x -aos -- libsndfile-dev.zip > NUL || exit -1
REM need to fix the naming of libsndfile otherwise the linker won't find it
mv lib\libsndfile-1.lib lib\sndfile.lib || exit -1
mv lib\libsndfile-1.def lib\sndfile.def || exit -1
rm *.zip
cd libsndfile-*
cp -rf * ..
cd ..
rm -rf libsndfile-*
cd d:\deps
dir
DEL /F C:\Strawberry\perl\bin\pkg-config.bat
displayName: 'Prerequisites'
- script: |
Expand Down Expand Up @@ -200,9 +210,10 @@ jobs:
7z x -aos -- libsndfile-dev.zip > NUL || exit -1
7z x -aos -- mingw.zip > NUL || exit -1
rm *.zip
REM need to fix the naming of libsndfile otherwise the linker won't find it
mv lib\libsndfile-1.lib lib\sndfile.lib || exit -1
mv lib\libsndfile-1.def lib\sndfile.def || exit -1
cd libsndfile-*
cp -rf * ..
cd ..
rm -rf libsndfile-*
cd mingw*\ && cp -rf * .. && cd .. && rm -rf mingw* || exit -1
cd $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform) && cp -rf * d:\deps\ && mv -f * .. && cd .. && rmdir $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform)\ || exit -1
DEL /F C:\Strawberry\perl\bin\pkg-config.bat
Expand Down
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ task:
name: FreeBSD
freebsd_instance:
matrix:
image_family: freebsd-14-0
image_family: freebsd-13-2
image_family: freebsd-14-1
image_family: freebsd-13-3

install_script: pwd && ls -la && pkg update --force && pkg install -y cmake glib alsa-lib ladspa portaudio pulseaudio pkgconf sdl2

Expand Down
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ updates:
- "*" # Group all Actions updates into a single larger pull request
schedule:
interval: weekly
ignore:
- dependency-name: "SonarSource/sonarcloud-github-c-cpp"
# Version 3 of that task causes the scanner to throw a Java exception...
versions:
- "3.x"
- "3"
1 change: 1 addition & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Fluidsynth Windows

on:
workflow_dispatch:
pull_request:
push:
paths-ignore:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "test/manual"]
path = test/manual
url = https://github.com/FluidSynth/testdata.git
53 changes: 33 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# FluidSynth - A Software Synthesizer
#
# Copyright (C) 2003-2023 Peter Hanappe and others.
# Copyright (C) 2003-2024 Peter Hanappe and others.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
Expand Down Expand Up @@ -46,10 +46,10 @@ set ( PACKAGE "fluidsynth" )

# FluidSynth package version
set ( FLUIDSYNTH_VERSION_MAJOR 2 )
set ( FLUIDSYNTH_VERSION_MINOR 3 )
set ( FLUIDSYNTH_VERSION_MICRO 5 )
set ( FLUIDSYNTH_VERSION_MINOR 4 )
set ( FLUIDSYNTH_VERSION_MICRO 1 )
set ( VERSION "${FLUIDSYNTH_VERSION_MAJOR}.${FLUIDSYNTH_VERSION_MINOR}.${FLUIDSYNTH_VERSION_MICRO}" )
set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" )
set ( FLUIDSYNTH_VERSION ${VERSION} )

# libfluidsynth - Library version
# *** NOTICE ***
Expand All @@ -61,8 +61,8 @@ set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" )
# if any interfaces have been removed/changed (compatibility broken): AGE=0
# 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 3 )
set ( LIB_VERSION_AGE 3 )
set ( LIB_VERSION_REVISION 1 )
set ( LIB_VERSION_INFO
"${LIB_VERSION_CURRENT}.${LIB_VERSION_AGE}.${LIB_VERSION_REVISION}" )

Expand All @@ -76,6 +76,7 @@ option ( enable-trap-on-fpe "enable SIGFPE trap on Floating Point Exceptions" of
option ( enable-ubsan "compile and link against UBSan (for debugging fluidsynth internals)" off )

# Options enabled by default
option ( enable-alsa "compile ALSA support (if it is available)" on )
option ( enable-aufile "compile support for sound file output" on )
option ( BUILD_SHARED_LIBS "Build a shared object or DLL" on )
option ( enable-dbus "compile DBUS support (if it is available)" on )
Expand All @@ -99,12 +100,9 @@ option ( enable-pipewire "compile PipeWire support (if it is available)" on )
option ( enable-readline "compile readline lib line editing (if it is available)" on )
option ( enable-threads "enable multi-threading support (such as parallel voice synthesis)" on )
option ( enable-openmp "enable OpenMP support (parallelization of soundfont decoding, vectorization of voice mixing, etc.)" on )
option ( enable-unicode "enable UNICODE build for Windows" on )

# Platform specific options
if ( CMAKE_SYSTEM MATCHES "Linux|FreeBSD|DragonFly" )
option ( enable-alsa "compile ALSA support (if it is available)" on )
endif ( CMAKE_SYSTEM MATCHES "Linux|FreeBSD|DragonFly" )

if ( CMAKE_SYSTEM MATCHES "Linux" )
option ( enable-systemd "compile systemd support (if it is available)" on )
endif ( CMAKE_SYSTEM MATCHES "Linux" )
Expand Down Expand Up @@ -185,7 +183,7 @@ if ( NOT HAVE_LONG_LONG AND NOT MSVC)
message ( FATAL_ERROR "Your compiler does not support intrinsic type 'long long'. Unable to compile fluidsynth." )
endif ()

include ( CMakePrintHelpers ) # for cmake_print_properties() and cmake_print_variables()
include ( CMakePrintHelpers ) # for cmake_print_properties() and cmake_print_variables()
include ( TestInline )
include ( TestVLA )
include ( TestBigEndian )
Expand Down Expand Up @@ -303,7 +301,9 @@ if ( WIN32 OR CYGWIN )
endif()
endif ()
message ( STATUS "Targeting Windows Version ${windows-version}" )
add_definitions ( -D _UNICODE -D UNICODE )
if ( enable-unicode )
add_definitions ( -D _UNICODE -D UNICODE )
endif ()
add_definitions ( -D _WIN32_WINNT=${windows-version} )
add_definitions ( -D WINVER=${windows-version} )
list ( APPEND CMAKE_REQUIRED_DEFINITIONS "-DWINVER=${windows-version}" )
Expand Down Expand Up @@ -346,7 +346,7 @@ if ( WIN32 )
set ( LIBFLUID_CPPFLAGS "-DFLUIDSYNTH_DLL_EXPORTS" )
set ( FLUID_CPPFLAGS "-DFLUIDSYNTH_NOT_A_DLL" )
if ( NOT MSVC )
# only set debug postfix if not MSVS building
# only set debug postfix if not MSVC building
set ( CMAKE_DEBUG_POSTFIX "_debug" )
endif ( NOT MSVC )

Expand Down Expand Up @@ -451,9 +451,9 @@ if ( enable-profiling )
elseif ( CMAKE_C_COMPILER_ID STREQUAL "GNU" )
set ( OPT_FLAGS "" )
endif ( )

set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPT_FLAGS}" )

find_program( CLANG_TIDY
NAMES "clang-tidy"
DOC "Path to clang-tidy executable" )
Expand Down Expand Up @@ -544,30 +544,42 @@ endif ()
unset ( LIBSNDFILE_SUPPORT CACHE )
unset ( LIBSNDFILE_HASVORBIS CACHE )
if ( enable-libsndfile )
find_package ( SndFile ${LIBSNDFILE_MINIMUM_VERSION} )
#set(CMAKE_FIND_DEBUG_MODE ON)
find_package ( SndFile ${LIBSNDFILE_MINIMUM_VERSION} QUIET )
if ( NOT SndFile_FOUND )
# Not all distros have switched to libsndfile's cmake based build system, see #1445.
# Therefore, discover sndfile via the legacy pkg-config magic.
find_package ( SndFileLegacy )
endif ()
set ( LIBSNDFILE_SUPPORT ${SndFile_FOUND} )
if ( LIBSNDFILE_SUPPORT )
message ( STATUS "Found libSndFile: ${SndFile_VERSION}" )
#cmake_print_properties(TARGETS SndFile::sndfile PROPERTIES LOCATION INTERFACE_INCLUDE_DIRECTORIES IMPORTED_CONFIGURATIONS)
cmake_print_variables(SndFile_WITH_EXTERNAL_LIBS SndFile_WITH_MPEG)
list( APPEND PC_REQUIRES_PRIV "sndfile")
if ( SndFile_WITH_EXTERNAL_LIBS )
set ( LIBSNDFILE_HASVORBIS 1 )
else (SndFile_WITH_EXTERNAL_LIBS)
message ( NOTICE "Seems like libsndfile was compiled without OGG/Vorbis support." )
endif (SndFile_WITH_EXTERNAL_LIBS)
else ( LIBSNDFILE_SUPPORT )
message( STATUS "Could NOT find SndFile (Set SndFile_DIR to the directory containing its CMake config) (Required is at least version ${LIBSNDFILE_MINIMUM_VERSION})" )
endif ( LIBSNDFILE_SUPPORT )
#set(CMAKE_FIND_DEBUG_MODE OFF)
endif ( enable-libsndfile )

unset ( PULSE_SUPPORT CACHE )
if ( enable-pulseaudio )
find_package ( PulseAudio ${PULSEAUDIO_MINIMUM_VERSION} )
find_package ( PulseAudio ${PULSEAUDIO_MINIMUM_VERSION} QUIET )
# Upstream config does not search for pulse-simple
find_library ( PULSEAUDIO_SIMPLE_LIBRARY NAMES "pulse-simple" )
find_library ( PULSEAUDIO_SIMPLE_LIBRARY NAMES "pulse-simple" QUIET )
if ( PULSEAUDIO_FOUND AND PULSEAUDIO_SIMPLE_LIBRARY )
set ( PULSE_SUPPORT TRUE )
set ( PULSEAUDIO_LIBRARIES ${PULSEAUDIO_SIMPLE_LIBRARY} ${PULSEAUDIO_LIBRARY} )
message ( STATUS "Found PulseAudio: ${PULSEAUDIO_LIBRARIES}" )
list( APPEND PC_REQUIRES_PRIV "libpulse-simple")
else ( PULSEAUDIO_FOUND AND PULSEAUDIO_SIMPLE_LIBRARY )
message( STATUS "Could NOT find PulseAudio (Set PulseAudio_DIR to the directory containing its CMake config)" )
message( STATUS "Could NOT find PulseAudio (Set PulseAudio_DIR to the directory containing its CMake config) (Required is at least version ${PULSEAUDIO_MINIMUM_VERSION})" )
endif ( PULSEAUDIO_FOUND AND PULSEAUDIO_SIMPLE_LIBRARY )
endif ( enable-pulseaudio )

Expand Down Expand Up @@ -749,7 +761,8 @@ set(TEST_SOUNDFONT "${FluidSynth_SOURCE_DIR}/sf2/VintageDreamsWaves-v2.sf2")
set(TEST_SOUNDFONT_UTF8_1 "${FluidSynth_SOURCE_DIR}/sf2/\\xE2\\x96\\xA0VintageDreamsWaves-v2\\xE2\\x96\\xA0.sf2")
set(TEST_SOUNDFONT_UTF8_2 "${FluidSynth_SOURCE_DIR}/sf2/VìntàgèDrèàmsWàvès-v2.sf2")
set(TEST_SOUNDFONT_SF3 "${FluidSynth_SOURCE_DIR}/sf2/VintageDreamsWaves-v2.sf3")
set(TEST_MIDI_UTF8 "${FluidSynth_SOURCE_DIR}/test/èmpty.mid")
set(TEST_MIDI_UTF8 "${FluidSynth_SOURCE_DIR}/test/ⓉⒺⓈⓉ.mid")
set(TEST_WAV_UTF8 "${FluidSynth_BINARY_DIR}/test/ⓉⒺⓈⓉ.wav")

# Make sure to link against libm before checking for math functions below
set ( CMAKE_REQUIRED_LIBRARIES "${LIBFLUID_LIBS};${WINDOWS_LIBS}" )
Expand Down
Loading

0 comments on commit 5950007

Please sign in to comment.