Skip to content

Commit

Permalink
Merge branch 'master' into awe32-nrpn
Browse files Browse the repository at this point in the history
  • Loading branch information
derselbst committed Aug 31, 2024
2 parents 676bd14 + 7f39048 commit d63769e
Show file tree
Hide file tree
Showing 23 changed files with 349 additions and 197 deletions.
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
16 changes: 14 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ set ( PACKAGE "fluidsynth" )
# FluidSynth package version
set ( FLUIDSYNTH_VERSION_MAJOR 2 )
set ( FLUIDSYNTH_VERSION_MINOR 3 )
set ( FLUIDSYNTH_VERSION_MICRO 5 )
set ( FLUIDSYNTH_VERSION_MICRO 6 )
set ( VERSION "${FLUIDSYNTH_VERSION_MAJOR}.${FLUIDSYNTH_VERSION_MINOR}.${FLUIDSYNTH_VERSION_MICRO}" )
set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" )

Expand All @@ -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 3 )
set ( LIB_VERSION_REVISION 4 )
set ( LIB_VERSION_INFO
"${LIB_VERSION_CURRENT}.${LIB_VERSION_AGE}.${LIB_VERSION_REVISION}" )

Expand Down Expand Up @@ -117,6 +117,7 @@ endif ( CMAKE_SYSTEM MATCHES "Darwin" )

if ( CMAKE_SYSTEM MATCHES "OS2" )
option ( enable-dart "compile DART support (if it is available)" on )
option ( enable-kai "compile KAI support (if it is available)" on )
set ( enable-ipv6 off )
endif ( CMAKE_SYSTEM MATCHES "OS2" )

Expand Down Expand Up @@ -367,6 +368,9 @@ set ( LIBFLUID_LIBS ${MATH_LIBRARY} Threads::Threads )
unset ( DART_SUPPORT CACHE )
unset ( DART_LIBS CACHE )
unset ( DART_INCLUDE_DIRS CACHE )
unset ( KAI_SUPPORT CACHE )
unset ( KAI_LIBS CACHE )
unset ( KAI_INCLUDE_DIRS CACHE )
if ( CMAKE_SYSTEM MATCHES "OS2" )
set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Zbin-files" )
set ( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Zbin-files" )
Expand All @@ -375,6 +379,14 @@ if ( CMAKE_SYSTEM MATCHES "OS2" )
set ( DART_SUPPORT ${HAVE_DART_H} )
unset ( DART_INCLUDE_DIRS CACHE )
endif ( enable-dart )
if ( enable-kai )
check_include_files ( "kai.h" HAVE_KAI_H )
if ( HAVE_KAI_H )
set ( KAI_SUPPORT ${HAVE_KAI_H} )
set ( KAI_LIBS "-lkai" )
endif ( HAVE_KAI_H )
unset ( KAI_INCLUDE_DIRS CACHE )
endif ( enable-kai )
endif ( CMAKE_SYSTEM MATCHES "OS2" )

# Solaris / SunOS
Expand Down
30 changes: 15 additions & 15 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ valuable information.

2006-02-20 Josh Green <[email protected]>

* Fixed build error that occured when neither LASH or LADCCA are
* Fixed build error that occurred when neither LASH or LADCCA are
present.
* Updated README-OSX from Ebrahim Mayat.

Expand Down Expand Up @@ -573,7 +573,7 @@ valuable information.
(main): User config and system config file are now loaded correctly

* src/fluid_cmd.c (fluid_shell_run): the shell doesn't get stuck
and loop on an emtpy string when the end of the stream is reached.
and loop on an empty string when the end of the stream is reached.

* src/fluid_io.c (fluid_istream_gets): fluid_istream_gets()
returns 0 if the end of the stream was reached and -1 on error.
Expand Down Expand Up @@ -804,7 +804,7 @@ valuable information.

1999-11-30 Antoine Schmitt <[email protected]>

* src/fluid_defsfont.c: inst_zone lokey is now properly inialized to 0
* src/fluid_defsfont.c: inst_zone lokey is now properly initialized to 0
(it was not, leading to random lost noteons depending on memory
initialization)

Expand Down Expand Up @@ -1048,13 +1048,13 @@ valuable information.
(iiwu_synth_system_reset): This function now also resets the
default controller values on the MIDI channels, and clears the
reverb and chorus delay lines.
(iiwu_synth_count_midi_channels): New function to retreive the
(iiwu_synth_count_midi_channels): New function to retrieve the
number of available midi channels.
(iiwu_synth_count_audio_channels): New function to retreive the
(iiwu_synth_count_audio_channels): New function to retrieve the
number of available midi channels.
(iiwu_synth_count_effects_channels): New function to retreive the
(iiwu_synth_count_effects_channels): New function to retrieve the
number of available effects channels.
(iiwu_synth_get_cpu_load): New function to retreive an estimation
(iiwu_synth_get_cpu_load): New function to retrieve an estimation
of the CPU load.

* src/iiwusynth.h: Added fields to handle multi-channel audio and
Expand Down Expand Up @@ -1346,7 +1346,7 @@ valuable information.
references.

* src/iiwu_cmd.c (iiwu_handle_reverb): renamed 'rev_enable' to
'reverb' in correspondance with the long command line arguments
'reverb' in correspondence with the long command line arguments

* src/iiwusynth.c (main): checking if files on command line are valid

Expand Down Expand Up @@ -1623,9 +1623,9 @@ valuable information.

* src/iiwu_synth.c (iiwu_sp_write_lr): now using a 64-bits
fixed-point number to calculate the phase of the
wavetable. because of rounding erros, the float value I used
wavetable. because of rounding errors, the float value I used
before gave terrible tuning problems. I updated all the
intepolation macros.
interpolation macros.

* src/iiwusynth_priv.h: included the iiwu_phase_t data type. This
type represents a 64-bits fixed-point number. It's used to hold
Expand All @@ -1644,9 +1644,9 @@ valuable information.
2001-06-07 Peter Hanappe <[email protected]>

* src/iiwu_synth.c (iiwu_sp_write_lr): rewrote the dsp function to
accept a seperate left and right channel buffer.
accept a separate left and right channel buffer.
(iiwu_sp_write_lr): using cubic hermite interpolation by default.
(iiwu_synth_write_lr): added a dsp function to accept a seperate
(iiwu_synth_write_lr): added a dsp function to accept a separate
left and right channel buffer.

2001-05-26 Peter Hanappe <[email protected]>
Expand All @@ -1668,20 +1668,20 @@ valuable information.

* src/iiwusynth.c: added the stupidly simple interpreter

* src/iiwu_synth.c: removed all param strcutures.
* src/iiwu_synth.c: removed all param structures.

* src/iiwu_synth.c (iiwu_channel_get_banknum): new function

2001-05-23 Peter Hanappe <[email protected]>

* src/iiwu_synth.c (iiwu_sp_write): Fixed devide by zero in filter
* src/iiwu_synth.c (iiwu_sp_write): Fixed divide by zero in filter

* src/smurf.c (gerr): applied Josh's patch: using va_list now (as
it should).

2001-05-22 Peter Hanappe <[email protected]>

* src/iiwu_midi.c: the midi handler is now devided in a dummy
* src/iiwu_midi.c: the midi handler is now divided in a dummy
iiwu_midi_handler_t and a "low level" driver. This allows for
multiple midi drivers to be compiled in.

Expand Down
1 change: 1 addition & 0 deletions FluidSynthConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set(FLUIDSYNTH_SUPPORT_COREMIDI @COREMIDI_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_DART @DART_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_DSOUND @DSOUND_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_JACK @JACK_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_KAI @KAI_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_MIDISHARE @MIDISHARE_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_OBOE @OBOE_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_OPENSLES @OPENSLES_SUPPORT@)
Expand Down
6 changes: 6 additions & 0 deletions cmake_admin/report.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ else ( DART_SUPPORT )
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} OS/2 DART: no\n" )
endif ( DART_SUPPORT )

if ( KAI_SUPPORT )
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} OS/2 KAI: yes\n" )
else ( KAI_SUPPORT )
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} OS/2 KAI: no\n" )
endif ( KAI_SUPPORT )

if ( OSS_SUPPORT )
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} OSS: yes\n" )
else ( OSS_SUPPORT )
Expand Down
4 changes: 2 additions & 2 deletions doc/fluidsynth-v20-devdoc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
\author David Henningsson
\author Tom Moebert
\author Copyright &copy; 2003-2023 Peter Hanappe, Conrad Berhörster, Antoine Schmitt, Pedro López-Cabanillas, Josh Green, David Henningsson, Tom Moebert
\version Revision 2.3.5
\date 2024-01-11
\version Revision 2.3.6
\date 2024-08-03

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.

Expand Down
10 changes: 10 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ if ( DART_SUPPORT )
set ( fluid_dart_SOURCES drivers/fluid_dart.c )
endif ( DART_SUPPORT )

if ( KAI_SUPPORT )
set ( fluid_kai_SOURCES drivers/fluid_kai.c )
endif ( KAI_SUPPORT )

if ( MIDISHARE_SUPPORT )
set ( fluid_midishare_SOURCES drivers/fluid_midishare.c )
endif ( MIDISHARE_SUPPORT )
Expand Down Expand Up @@ -232,6 +236,7 @@ add_library ( libfluidsynth-OBJ OBJECT
${fluid_dart_SOURCES}
${fluid_dbus_SOURCES}
${fluid_jack_SOURCES}
${fluid_kai_SOURCES}
${fluid_pipewire_SOURCES}
${fluid_midishare_SOURCES}
${fluid_opensles_SOURCES}
Expand Down Expand Up @@ -347,6 +352,7 @@ endif ( MACOSX_FRAMEWORK )
# but since they do not have a link step nothing is done with their object files.
target_link_libraries ( libfluidsynth-OBJ PUBLIC
${DART_LIBS}
${KAI_LIBS}
${COREAUDIO_LIBS}
${COREMIDI_LIBS}
${WINDOWS_LIBS}
Expand Down Expand Up @@ -414,6 +420,10 @@ if ( DART_SUPPORT )
target_include_directories ( libfluidsynth-OBJ PUBLIC ${DART_INCLUDE_DIRS} )
endif ( DART_SUPPORT )

if ( KAI_SUPPORT )
target_include_directories ( libfluidsynth-OBJ PUBLIC ${KAI_INCLUDE_DIRS} )
endif ( KAI_SUPPORT )

if ( MIDISHARE_SUPPORT )
target_link_libraries ( libfluidsynth-OBJ PUBLIC MidiShare::MidiShare )
endif ( MIDISHARE_SUPPORT )
Expand Down
3 changes: 3 additions & 0 deletions src/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@
/* Define to enable JACK driver */
#cmakedefine JACK_SUPPORT @JACK_SUPPORT@

/* Define to enable KAI driver */
#cmakedefine KAI_SUPPORT @KAI_SUPPORT@

/* Define to enable PipeWire driver */
#cmakedefine PIPEWIRE_SUPPORT @PIPEWIRE_SUPPORT@

Expand Down
10 changes: 10 additions & 0 deletions src/drivers/fluid_adriver.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@ static const fluid_audriver_definition_t fluid_audio_drivers[] =
},
#endif

#if KAI_SUPPORT
{
"kai",
new_fluid_kai_audio_driver,
NULL,
delete_fluid_kai_audio_driver,
fluid_kai_audio_driver_settings
},
#endif

#if DART_SUPPORT
{
"dart",
Expand Down
7 changes: 7 additions & 0 deletions src/drivers/fluid_adriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ fluid_audio_driver_t *new_fluid_sndmgr_audio_driver2(fluid_settings_t *settings,
void delete_fluid_sndmgr_audio_driver(fluid_audio_driver_t *p);
#endif

#if KAI_SUPPORT
fluid_audio_driver_t *new_fluid_kai_audio_driver(fluid_settings_t *settings,
fluid_synth_t *synth);
void delete_fluid_kai_audio_driver(fluid_audio_driver_t *p);
void fluid_kai_audio_driver_settings(fluid_settings_t *settings);
#endif

#if DART_SUPPORT
fluid_audio_driver_t *new_fluid_dart_audio_driver(fluid_settings_t *settings,
fluid_synth_t *synth);
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/fluid_dart.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ typedef struct
USHORT usDeviceID; /* Amp Mixer device id */
MCI_MIX_BUFFER MixBuffers[NUM_MIX_BUFS]; /* Device buffers */
MCI_MIXSETUP_PARMS MixSetupParms; /* Mixer parameters */
MCI_BUFFER_PARMS BufferParms; /* Device buffer parms */
MCI_BUFFER_PARMS BufferParms; /* Device buffer params */
} fluid_dart_audio_driver_t;

static HMODULE m_hmodMDM = NULLHANDLE;
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/fluid_jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ new_fluid_jack_client(fluid_settings_t *settings, int isaudio, void *driver)
fluid_mutex_lock(last_client_mutex); /* ++ lock last_client */

/* If the last client uses the same server and is not the same type (audio or MIDI),
* then re-use the client. */
* then reuse the client. */
if(last_client &&
(last_client->server != NULL && server != NULL && FLUID_STRCMP(last_client->server, server) == 0) &&
((!isaudio && last_client->midi_driver == NULL) || (isaudio && last_client->audio_driver == NULL)))
Expand Down
Loading

0 comments on commit d63769e

Please sign in to comment.