Hello community,

here is the log from the commit of package fluidsynth for openSUSE:Factory 
checked in at 2018-03-06 10:44:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fluidsynth (Old)
 and      /work/SRC/openSUSE:Factory/.fluidsynth.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fluidsynth"

Tue Mar  6 10:44:29 2018 rev:36 rq:582072 version:1.1.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/fluidsynth/fluidsynth.changes    2018-02-25 
12:20:16.616080674 +0100
+++ /work/SRC/openSUSE:Factory/.fluidsynth.new/fluidsynth.changes       
2018-03-06 10:44:30.754300121 +0100
@@ -1,0 +2,21 @@
+Fri Mar  2 16:47:20 UTC 2018 - [email protected]
+
+- Avoid using indirection macros
+- Do not hard-code /usr/sbin
+
+-------------------------------------------------------------------
+Sun Feb 25 11:57:25 UTC 2018 - [email protected]
+
+- Update to 1.1.10:
+  * avoid a buffer overrun when loading malformed soundfonts
+  * fix synth.default-soundfont returning incomplete path
+  * improve reliability of fluid_is_soundfont()
+  * include windows version info in libfluidsynth.dll
+  * enable jack midi driver to support more than 16 midi channels
+  * minor cmake adjustments for MSVC builds to enable building fluidsynth as 
vcpkg package
+  * fix build issues against statically built fluidsynth library on all OSs
+  * enable fluidsynth to be set up as systemd user service
+  * cmake: prevent double usage of LIB_SUFFIX and LIB_INSTALL_DIR
+- Install systemd service files
+
+-------------------------------------------------------------------

Old:
----
  fluidsynth-1.1.9.tar.gz

New:
----
  fluidsynth-1.1.10.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fluidsynth.spec ++++++
--- /var/tmp/diff_new_pack.ReMvU1/_old  2018-03-06 10:44:31.278281190 +0100
+++ /var/tmp/diff_new_pack.ReMvU1/_new  2018-03-06 10:44:31.282281045 +0100
@@ -15,9 +15,15 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+# fix build for older distros and architectures where _fillupdir is
+# not yet defined by using the old path as recommended by
+# 
https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros#.25_fillupdir
+%if ! %{defined _fillupdir}
+ %define _fillupdir /var/adm/fillup-templates
+%endif
 
 Name:           fluidsynth
-Version:        1.1.9
+Version:        1.1.10
 Release:        0
 Summary:        A Real-Time Software Synthesizer That Uses Soundfont(tm)
 License:        LGPL-2.1+
@@ -34,6 +40,8 @@
 BuildRequires:  pkgconfig(jack)
 BuildRequires:  pkgconfig(libpulse)
 BuildRequires:  pkgconfig(sndfile)
+%{?systemd_requires}
+PreReq:         %fillup_prereq
 
 %description
 FluidSynth (formerly IIWU Synth) is a real-time software synthesizer
@@ -63,10 +71,8 @@
 %setup -q
 
 %build
-# Upstream uses both LIB_SUFFIX and LIB_INSTALL_DIR... so it gets set to
-# lib6464 unless overriden
 %cmake \
-    -DLIB_INSTALL_DIR:PATH=/usr/lib \
+    -DFLUID_DAEMON_ENV_FILE=%{_fillupdir}/sysconfig.%{name} \
     -Denable-ladspa=1 \
     -Denable-lash=0
 make %{?_smp_mflags}
@@ -74,14 +80,36 @@
 %install
 %cmake_install
 
+# manually install systemd service files
+install -Dm 644 build/fluidsynth.conf 
%{buildroot}%{_fillupdir}/sysconfig.%{name}
+install -Dm 644 build/fluidsynth.service 
%{buildroot}%{_unitdir}/%{name}.service
+install -d %{buildroot}%{_sbindir}
+ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
+
 %post -n libfluidsynth1 -p /sbin/ldconfig
 %postun -n libfluidsynth1 -p /sbin/ldconfig
 
+%pre
+%service_add_pre %{name}.service
+
+%post
+%fillup_only
+%service_add_post %{name}.service
+
+%preun
+%service_del_preun %{name}.service
+
+%postun
+%service_del_postun %{name}.service
+
 %files
 %license LICENSE
 %doc AUTHORS ChangeLog NEWS README.md THANKS TODO
 %{_mandir}/man?/*
 %{_bindir}/*
+%{_unitdir}/%{name}.service
+%{_sbindir}/rc%{name}
+%{_fillupdir}/sysconfig.%{name}
 
 %files devel
 %{_libdir}/lib*.so

++++++ fluidsynth-1.1.9.tar.gz -> fluidsynth-1.1.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/CMakeLists.txt 
new/fluidsynth-1.1.10/CMakeLists.txt
--- old/fluidsynth-1.1.9/CMakeLists.txt 2018-01-02 16:14:56.000000000 +0100
+++ new/fluidsynth-1.1.10/CMakeLists.txt        2018-02-24 18:32:40.000000000 
+0100
@@ -29,7 +29,7 @@
 # FluidSynth package version
 set ( FLUIDSYNTH_VERSION_MAJOR 1 )
 set ( FLUIDSYNTH_VERSION_MINOR 1 )
-set ( FLUIDSYNTH_VERSION_MICRO 9 )
+set ( FLUIDSYNTH_VERSION_MICRO 10 )
 set ( VERSION 
"${FLUIDSYNTH_VERSION_MAJOR}.${FLUIDSYNTH_VERSION_MINOR}.${FLUIDSYNTH_VERSION_MICRO}"
 )
 set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" )
 
@@ -44,7 +44,7 @@
 # This is not exactly the same algorithm as the libtool one, but the results 
are the same.
 set ( LIB_VERSION_CURRENT 1 )
 set ( LIB_VERSION_AGE 7 )
-set ( LIB_VERSION_REVISION 0 )
+set ( LIB_VERSION_REVISION 1 )
 set ( LIB_VERSION_INFO
       "${LIB_VERSION_CURRENT}.${LIB_VERSION_AGE}.${LIB_VERSION_REVISION}" )
 
@@ -88,7 +88,7 @@
 endif ( CMAKE_SYSTEM MATCHES "OS2" )
 
 # Initialize the library directory name suffix.
-if (NOT MINGW)
+if (NOT MINGW AND NOT MSVC)
 if ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
   set ( _init_lib_suffix "64" )
 else ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
@@ -175,7 +175,9 @@
   set ( WINDOWS_LIBS "dsound;winmm;ws2_32" )
   set ( LIBFLUID_CPPFLAGS "-DFLUIDSYNTH_DLL_EXPORTS" )
   set ( FLUID_CPPFLAGS "-DFLUIDSYNTH_NOT_A_DLL" )
-  set ( CMAKE_DEBUG_POSTFIX "_debug" )
+  if (NOT MSVC)
+    set ( CMAKE_DEBUG_POSTFIX "_debug" )
+  endif()
   # MinGW compiler (a Windows GCC port)
   if ( MINGW )
     set ( MINGW32 1 )
@@ -218,7 +220,7 @@
 if ( CMAKE_SYSTEM MATCHES "Darwin" )
   set ( DARWIN 1 )
   set ( CMAKE_INSTALL_NAME_DIR
-        ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}${LIB_SUFFIX} )
+        ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR} )
   if ( enable-coreaudio )
     check_include_file ( CoreAudio/AudioHardware.h COREAUDIO_FOUND )
     if ( COREAUDIO_FOUND )
@@ -441,6 +443,8 @@
 # General configuration file
 configure_file ( ${CMAKE_SOURCE_DIR}/src/config.cmake
                  ${CMAKE_BINARY_DIR}/config.h )
+configure_file ( ${CMAKE_SOURCE_DIR}/include/fluidsynth.cmake
+                 ${CMAKE_BINARY_DIR}/include/fluidsynth.h )
 add_definitions ( -DHAVE_CONFIG_H )
 
 # Extra configuration file for MS VisualC compiler
@@ -457,12 +461,12 @@
 # pkg-config support
 set ( prefix "${CMAKE_INSTALL_PREFIX}" )
 set ( exec_prefix "\${prefix}" )
-set ( libdir "\${exec_prefix}/${LIB_INSTALL_DIR}${LIB_SUFFIX}" )
+set ( libdir "\${exec_prefix}/${LIB_INSTALL_DIR}" )
 set ( includedir "\${prefix}/${INCLUDE_INSTALL_DIR}" )
 configure_file ( fluidsynth.pc.in
        ${CMAKE_BINARY_DIR}/fluidsynth.pc IMMEDIATE @ONLY )
 install ( FILES ${CMAKE_BINARY_DIR}/fluidsynth.pc
-       DESTINATION ${LIB_INSTALL_DIR}${LIB_SUFFIX}/pkgconfig )
+       DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
 
 # Extra targets for Unix build environments
 if ( UNIX )
@@ -470,6 +474,15 @@
     configure_file ( fluidsynth.spec.in
         ${CMAKE_BINARY_DIR}/fluidsynth.spec IMMEDIATE @ONLY )
 
+    if ( DEFINED FLUID_DAEMON_ENV_FILE)
+        configure_file ( fluidsynth.service.in
+        ${CMAKE_BINARY_DIR}/fluidsynth.service @ONLY )
+
+        configure_file ( fluidsynth.conf.in
+        ${CMAKE_BINARY_DIR}/fluidsynth.conf @ONLY )
+
+    endif ( DEFINED FLUID_DAEMON_ENV_FILE )
+
     # uninstall custom target
     configure_file ( "${CMAKE_SOURCE_DIR}/cmake_admin/cmake_uninstall.cmake.in"
       "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/cmake_admin/DefaultDirs.cmake 
new/fluidsynth-1.1.10/cmake_admin/DefaultDirs.cmake
--- old/fluidsynth-1.1.9/cmake_admin/DefaultDirs.cmake  2018-01-02 
16:14:56.000000000 +0100
+++ new/fluidsynth-1.1.10/cmake_admin/DefaultDirs.cmake 2018-02-24 
18:32:40.000000000 +0100
@@ -6,7 +6,7 @@
   set (DEFAULT_SOUNDFONT "C:\\\\soundfonts\\\\default.sf2" CACHE STRING
        "Default soundfont file")
 else ( WIN32 )
-  set (DEFAULT_SOUNDFONT "share/soundfonts/default.sf2" CACHE STRING
+  set (DEFAULT_SOUNDFONT 
"${CMAKE_INSTALL_PREFIX}/share/soundfonts/default.sf2" CACHE STRING
        "Default soundfont file")
 endif ( WIN32 )
 mark_as_advanced (DEFAULT_SOUNDFONT)
@@ -31,7 +31,7 @@
 mark_as_advanced (SBIN_INSTALL_DIR) 
 
 # LIB_INSTALL_DIR - the directory where libraries will be installed
-set (LIB_INSTALL_DIR "lib" CACHE STRING "The install dir for libraries")
+set (LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE STRING "The install dir for 
libraries")
 mark_as_advanced (LIB_INSTALL_DIR) 
 
 # INCLUDE_INSTALL_DIR - the install dir for header files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/cmake_admin/VersionInfo.in 
new/fluidsynth-1.1.10/cmake_admin/VersionInfo.in
--- old/fluidsynth-1.1.9/cmake_admin/VersionInfo.in     1970-01-01 
01:00:00.000000000 +0100
+++ new/fluidsynth-1.1.10/cmake_admin/VersionInfo.in    2018-02-24 
18:32:40.000000000 +0100
@@ -0,0 +1,79 @@
+#pragma once
+
+#ifndef PRODUCT_VERSION_MAJOR
+#define PRODUCT_VERSION_MAJOR @PRODUCT_VERSION_MAJOR@
+#endif
+
+#ifndef PRODUCT_VERSION_MINOR
+#define PRODUCT_VERSION_MINOR @PRODUCT_VERSION_MINOR@
+#endif
+
+#ifndef PRODUCT_VERSION_PATCH
+#define PRODUCT_VERSION_PATCH @PRODUCT_VERSION_PATCH@
+#endif
+
+#ifndef PRODUCT_VERSION_BUILD
+#define PRODUCT_VERSION_BUILD @PRODUCT_VERSION_REVISION@
+#endif
+
+#ifndef FILE_VERSION_MAJOR
+#define FILE_VERSION_MAJOR @PRODUCT_VERSION_MAJOR@
+#endif
+
+#ifndef FILE_VERSION_MINOR
+#define FILE_VERSION_MINOR @PRODUCT_VERSION_MINOR@
+#endif
+
+#ifndef FILE_VERSION_PATCH
+#define FILE_VERSION_PATCH @PRODUCT_VERSION_PATCH@
+#endif
+
+#ifndef FILE_VERSION_BUILD
+#define FILE_VERSION_BUILD @PRODUCT_VERSION_REVISION@
+#endif
+
+#ifndef __TO_STRING
+#define __TO_STRING_IMPL(x) #x
+#define __TO_STRING(x) __TO_STRING_IMPL(x)
+#endif
+
+#define PRODUCT_VERSION_MAJOR_MINOR_STR        
__TO_STRING(PRODUCT_VERSION_MAJOR) "." __TO_STRING(PRODUCT_VERSION_MINOR)
+#define PRODUCT_VERSION_MAJOR_MINOR_PATCH_STR  PRODUCT_VERSION_MAJOR_MINOR_STR 
"." __TO_STRING(PRODUCT_VERSION_PATCH)
+#define PRODUCT_VERSION_FULL_STR               
PRODUCT_VERSION_MAJOR_MINOR_PATCH_STR "." __TO_STRING(PRODUCT_VERSION_BUILD)
+#define PRODUCT_VERSION_RESOURCE               
PRODUCT_VERSION_MAJOR,PRODUCT_VERSION_MINOR,PRODUCT_VERSION_PATCH,PRODUCT_VERSION_BUILD
+#define PRODUCT_VERSION_RESOURCE_STR           PRODUCT_VERSION_FULL_STR "\0"
+
+#define FILE_VERSION_MAJOR_MINOR_STR        __TO_STRING(FILE_VERSION_MAJOR) 
"." __TO_STRING(FILE_VERSION_MINOR)
+#define FILE_VERSION_MAJOR_MINOR_PATCH_STR  FILE_VERSION_MAJOR_MINOR_STR "." 
__TO_STRING(FILE_VERSION_PATCH)
+#define FILE_VERSION_FULL_STR               FILE_VERSION_MAJOR_MINOR_PATCH_STR 
"." __TO_STRING(FILE_VERSION_BUILD)
+#define FILE_VERSION_RESOURCE               
FILE_VERSION_MAJOR,FILE_VERSION_MINOR,FILE_VERSION_PATCH,FILE_VERSION_BUILD
+#define FILE_VERSION_RESOURCE_STR           FILE_VERSION_FULL_STR "\0"
+
+#ifndef PRODUCT_COMMENTS
+#define PRODUCT_COMMENTS           "@PRODUCT_COMMENTS@\0"
+#endif
+
+#ifndef PRODUCT_COMPANY_NAME
+#define PRODUCT_COMPANY_NAME       "@PRODUCT_COMPANY_NAME@\0"
+#endif
+
+#ifndef PRODUCT_COMPANY_COPYRIGHT
+#define PRODUCT_COMPANY_COPYRIGHT  "@PRODUCT_COMPANY_COPYRIGHT@\0"
+#endif
+
+#ifndef PRODUCT_FILE_DESCRIPTION
+#define PRODUCT_FILE_DESCRIPTION   "@PRODUCT_FILE_DESCRIPTION@\0"
+#endif
+
+#ifndef PRODUCT_INTERNAL_NAME
+#define PRODUCT_INTERNAL_NAME      "@PRODUCT_NAME@\0"
+#endif
+
+#ifndef PRODUCT_ORIGINAL_FILENAME
+#define PRODUCT_ORIGINAL_FILENAME  "@PRODUCT_ORIGINAL_FILENAME@\0"
+#endif
+
+#ifndef PRODUCT_BUNDLE
+#define PRODUCT_BUNDLE             "@PRODUCT_BUNDLE@\0"
+#endif
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/cmake_admin/VersionResource.rc 
new/fluidsynth-1.1.10/cmake_admin/VersionResource.rc
--- old/fluidsynth-1.1.9/cmake_admin/VersionResource.rc 1970-01-01 
01:00:00.000000000 +0100
+++ new/fluidsynth-1.1.10/cmake_admin/VersionResource.rc        2018-02-24 
18:32:40.000000000 +0100
@@ -0,0 +1,37 @@
+#include "VersionInfo.h"
+#include "winres.h"
+
+VS_VERSION_INFO VERSIONINFO
+    FILEVERSION FILE_VERSION_RESOURCE
+    PRODUCTVERSION PRODUCT_VERSION_RESOURCE
+    FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+#ifdef _DEBUG
+    FILEFLAGS 0x1L
+#else
+    FILEFLAGS 0x0L
+#endif
+    FILEOS VOS__WINDOWS32
+    FILETYPE VFT_DLL
+    FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904E4"
+        BEGIN
+            VALUE "Comments", PRODUCT_COMMENTS
+            VALUE "CompanyName", PRODUCT_COMPANY_NAME
+            VALUE "FileDescription", PRODUCT_FILE_DESCRIPTION
+            VALUE "FileVersion", FILE_VERSION_RESOURCE_STR
+            VALUE "InternalName", PRODUCT_INTERNAL_NAME
+            VALUE "LegalCopyright", PRODUCT_COMPANY_COPYRIGHT
+            VALUE "OriginalFilename", PRODUCT_ORIGINAL_FILENAME
+            VALUE "ProductName", PRODUCT_BUNDLE
+            VALUE "ProductVersion", PRODUCT_VERSION_RESOURCE_STR
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1252
+    END
+END
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fluidsynth-1.1.9/cmake_admin/generate_product_version.cmake 
new/fluidsynth-1.1.10/cmake_admin/generate_product_version.cmake
--- old/fluidsynth-1.1.9/cmake_admin/generate_product_version.cmake     
1970-01-01 01:00:00.000000000 +0100
+++ new/fluidsynth-1.1.10/cmake_admin/generate_product_version.cmake    
2018-02-24 18:32:40.000000000 +0100
@@ -0,0 +1,107 @@
+include (CMakeParseArguments)
+
+set (GenerateProductVersionCurrentDir ${CMAKE_CURRENT_LIST_DIR})
+
+# generate_product_version() function
+#
+# This function uses VersionInfo.in template file and VersionResource.rc file
+# to generate WIN32 resource with version information and general resource 
strings.
+#
+# Usage:
+#   generate_product_version(
+#     SomeOutputResourceVariable
+#     NAME MyGreatProject
+#     ICON ${PATH_TO_APP_ICON}
+#     VERSION_MAJOR 2
+#     VERSION_MINOR 3
+#     VERSION_PATH ${BUILD_COUNTER}
+#     VERSION_REVISION ${BUILD_REVISION}
+#   )
+# where BUILD_COUNTER and BUILD_REVISION could be values from your CI server.
+#
+# You can use generated resource for your executable targets:
+#   add_executable(target-name ${target-files} ${SomeOutputResourceVariable})
+#
+# You can specify resource strings in arguments:
+#   NAME               - name of executable (no defaults, ex: Microsoft Word)
+#   BUNDLE             - bundle (${NAME} is default, ex: Microsoft Office)
+#   ICON               - path to application icon 
(${CMAKE_SOURCE_DIR}/product.ico by default)
+#   VERSION_MAJOR      - 1 is default
+#   VERSION_MINOR      - 0 is default
+#   VERSION_PATCH      - 0 is default
+#   VERSION_REVISION   - 0 is default
+#   COMPANY_NAME       - your company name (no defaults)
+#   COMPANY_COPYRIGHT  - ${COMPANY_NAME} (C) Copyright ${CURRENT_YEAR} is 
default
+#   COMMENTS           - ${NAME} v${VERSION_MAJOR}.${VERSION_MINOR} is default
+#   ORIGINAL_FILENAME  - ${NAME} is default
+#   INTERNAL_NAME      - ${NAME} is default
+#   FILE_DESCRIPTION   - ${NAME} is default
+function(generate_product_version outfiles)
+    set (options)
+    set (oneValueArgs
+        NAME
+        BUNDLE
+        VERSION_MAJOR
+        VERSION_MINOR
+        VERSION_PATCH
+        VERSION_REVISION
+        COMPANY_NAME
+        COMPANY_COPYRIGHT
+        COMMENTS
+        ORIGINAL_FILENAME
+        INTERNAL_NAME
+        FILE_DESCRIPTION)
+    set (multiValueArgs)
+    cmake_parse_arguments(PRODUCT "${options}" "${oneValueArgs}" 
"${multiValueArgs}" ${ARGN})
+
+    if (NOT PRODUCT_BUNDLE OR "${PRODUCT_BUNDLE}" STREQUAL "")
+        set(PRODUCT_BUNDLE "${PRODUCT_NAME}")
+    endif()
+#    if (NOT PRODUCT_ICON OR "${PRODUCT_ICON}" STREQUAL "")
+#        set(PRODUCT_ICON "${CMAKE_SOURCE_DIR}/product.ico")
+#    endif()
+
+    if (NOT PRODUCT_VERSION_MAJOR OR "${PRODUCT_VERSION_MAJOR}" STREQUAL "")
+        set(PRODUCT_VERSION_MAJOR 1)
+    endif()
+    if (NOT PRODUCT_VERSION_MINOR OR "${PRODUCT_VERSION_MINOR}" STREQUAL "")
+        set(PRODUCT_VERSION_MINOR 0)
+    endif()
+    if (NOT PRODUCT_VERSION_PATCH OR "${PRODUCT_VERSION_PATCH}" STREQUAL "")
+        set(PRODUCT_VERSION_PATCH 0)
+    endif()
+    if (NOT PRODUCT_VERSION_REVISION OR "${PRODUCT_VERSION_REVISION}" STREQUAL 
"")
+        set(PRODUCT_VERSION_REVISION 0)
+    endif()
+
+    if (NOT PRODUCT_COMPANY_COPYRIGHT OR "${PRODUCT_COMPANY_COPYRIGHT}" 
STREQUAL "")
+        string(TIMESTAMP PRODUCT_CURRENT_YEAR "%Y")
+        set(PRODUCT_COMPANY_COPYRIGHT "${PRODUCT_COMPANY_NAME} (C) Copyright 
${PRODUCT_CURRENT_YEAR}")
+    endif()
+    if (NOT PRODUCT_COMMENTS OR "${PRODUCT_COMMENTS}" STREQUAL "")
+        set(PRODUCT_COMMENTS "${PRODUCT_NAME} 
v${PRODUCT_VERSION_MAJOR}.${PRODUCT_VERSION_MINOR}")
+    endif()
+    if (NOT PRODUCT_ORIGINAL_FILENAME OR "${PRODUCT_ORIGINAL_FILENAME}" 
STREQUAL "")
+        set(PRODUCT_ORIGINAL_FILENAME "${PRODUCT_NAME}")
+    endif()
+    if (NOT PRODUCT_INTERNAL_NAME OR "${PRODUCT_INTERNAL_NAME}" STREQUAL "")
+        set(PRODUCT_INTERNAL_NAME "${PRODUCT_NAME}")
+    endif()
+    if (NOT PRODUCT_FILE_DESCRIPTION OR "${PRODUCT_FILE_DESCRIPTION}" STREQUAL 
"")
+        set(PRODUCT_FILE_DESCRIPTION "${PRODUCT_NAME}")
+    endif()
+
+    set (_VersionInfoFile ${CMAKE_CURRENT_BINARY_DIR}/VersionInfo.h)
+    set (_VersionResourceFile ${CMAKE_CURRENT_BINARY_DIR}/VersionResource.rc)
+    configure_file(
+        ${GenerateProductVersionCurrentDir}/VersionInfo.in
+        ${_VersionInfoFile}
+        @ONLY)
+    configure_file(
+        ${GenerateProductVersionCurrentDir}/VersionResource.rc
+        ${_VersionResourceFile}
+        COPYONLY)
+    list(APPEND ${outfiles} ${_VersionInfoFile} ${_VersionResourceFile})
+    set (${outfiles} ${${outfiles}} PARENT_SCOPE)
+endfunction()
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/configure.ac 
new/fluidsynth-1.1.10/configure.ac
--- old/fluidsynth-1.1.9/configure.ac   2018-01-02 16:14:56.000000000 +0100
+++ new/fluidsynth-1.1.10/configure.ac  2018-02-24 18:32:40.000000000 +0100
@@ -8,7 +8,7 @@
 
 FLUIDSYNTH_VERSION_MAJOR=1
 FLUIDSYNTH_VERSION_MINOR=1
-FLUIDSYNTH_VERSION_MICRO=9
+FLUIDSYNTH_VERSION_MICRO=10
 
FLUIDSYNTH_VERSION=$FLUIDSYNTH_VERSION_MAJOR.$FLUIDSYNTH_VERSION_MINOR.$FLUIDSYNTH_VERSION_MICRO
 
 AC_SUBST(FLUIDSYNTH_VERSION_MAJOR)
@@ -29,7 +29,7 @@
 dnl if any interfaces have been removed/changed (compatibility broken): 
lt_age=0
 
 m4_define([lt_current], [6])
-m4_define([lt_revision], [0])
+m4_define([lt_revision], [1])
 m4_define([lt_age], [7])
 
 LT_VERSION_INFO="lt_current:lt_revision:lt_age"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/doc/Doxyfile 
new/fluidsynth-1.1.10/doc/Doxyfile
--- old/fluidsynth-1.1.9/doc/Doxyfile   2018-01-02 16:14:56.000000000 +0100
+++ new/fluidsynth-1.1.10/doc/Doxyfile  2018-02-24 18:32:40.000000000 +0100
@@ -5,7 +5,7 @@
 #---------------------------------------------------------------------------
 DOXYFILE_ENCODING = UTF-8
 PROJECT_NAME = libfluidsynth
-PROJECT_NUMBER = 1.1.9
+PROJECT_NUMBER = 1.1.10
 OUTPUT_DIRECTORY = api
 CREATE_SUBDIRS = NO
 OUTPUT_LANGUAGE = English
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/doc/fluidsynth-v11-devdoc.txt 
new/fluidsynth-1.1.10/doc/fluidsynth-v11-devdoc.txt
--- old/fluidsynth-1.1.9/doc/fluidsynth-v11-devdoc.txt  2018-01-02 
16:14:56.000000000 +0100
+++ new/fluidsynth-1.1.10/doc/fluidsynth-v11-devdoc.txt 2018-02-24 
18:32:40.000000000 +0100
@@ -8,8 +8,8 @@
 \author David Henningsson
 \author Tom Moebert
 \author Copyright © 2003-2018 Peter Hanappe, Conrad Berhörster, Antoine 
Schmitt, Pedro López-Cabanillas, Josh Green, David Henningsson, Tom Moebert
-\version Revision 1.1.9
-\date 2018-01-02
+\version Revision 1.1.10
+\date 2018-02-24
 
 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 http://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 http://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.
 
@@ -21,6 +21,7 @@
 
 - \ref Disclaimer
 - \ref Introduction
+- \ref NewIn1_1_10
 - \ref NewIn1_1_9
 - \ref NewIn1_1_8
 - \ref NewIn1_1_7
@@ -67,6 +68,15 @@
 
 - FluidSynth is open source, in active development. For more details, take a 
look at http://www.fluidsynth.org
 
+\section NewIn1_1_10 Whats new in 1.1.10?
+
+Changes in FluidSynth 1.1.10 concerning developers:
+
+- fluid_is_soundfont() checks for "sfbk" header
+
+- For a full list of bug fixes, see
+  https://github.com/FluidSynth/fluidsynth/wiki/ChangeLog#fluidsynth-1110
+
 \section NewIn1_1_9 Whats new in 1.1.9?
 
 Changes in FluidSynth 1.1.9 concerning developers:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/fluidsynth.conf.in 
new/fluidsynth-1.1.10/fluidsynth.conf.in
--- old/fluidsynth-1.1.9/fluidsynth.conf.in     1970-01-01 01:00:00.000000000 
+0100
+++ new/fluidsynth-1.1.10/fluidsynth.conf.in    2018-02-24 18:32:40.000000000 
+0100
@@ -0,0 +1,5 @@
+# Mandatory parameters (uncomment and edit)
+#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'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/fluidsynth.service.in 
new/fluidsynth-1.1.10/fluidsynth.service.in
--- old/fluidsynth-1.1.9/fluidsynth.service.in  1970-01-01 01:00:00.000000000 
+0100
+++ new/fluidsynth-1.1.10/fluidsynth.service.in 2018-02-24 18:32:40.000000000 
+0100
@@ -0,0 +1,13 @@
+[Unit]
+Description=FluidSynth Daemon
+Documentation=man:fluidsynth(1)
+After=sound.target
+
+[Service]
+EnvironmentFile=@FLUID_DAEMON_ENV_FILE@
+EnvironmentFile=-%h/.config/fluidsynth
+ExecStart=@CMAKE_INSTALL_PREFIX@/@BIN_INSTALL_DIR@/fluidsynth -is $OTHER_OPTS 
$SOUND_FONT
+
+[Install]
+WantedBy=multi-user.target
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/include/CMakeLists.txt 
new/fluidsynth-1.1.10/include/CMakeLists.txt
--- old/fluidsynth-1.1.9/include/CMakeLists.txt 2018-01-02 16:14:56.000000000 
+0100
+++ new/fluidsynth-1.1.10/include/CMakeLists.txt        2018-02-24 
18:32:40.000000000 +0100
@@ -22,5 +22,5 @@
 add_subdirectory ( fluidsynth )
 
 IF (NOT MACOSX_FRAMEWORK )
-    install ( FILES fluidsynth.h DESTINATION ${INCLUDE_INSTALL_DIR} )
+    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/fluidsynth.h DESTINATION 
${INCLUDE_INSTALL_DIR} )
 ENDIF (NOT MACOSX_FRAMEWORK )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/include/fluidsynth/sfont.h 
new/fluidsynth-1.1.10/include/fluidsynth/sfont.h
--- old/fluidsynth-1.1.9/include/fluidsynth/sfont.h     2018-01-02 
16:14:56.000000000 +0100
+++ new/fluidsynth-1.1.10/include/fluidsynth/sfont.h    2018-02-24 
18:32:40.000000000 +0100
@@ -121,7 +121,7 @@
   /**
    * Get a virtual SoundFont preset by bank and program numbers.
    * @param sfont Virtual SoundFont
-   * @param bank MIDI bank number (0-16384)
+   * @param bank MIDI bank number (0-16383)
    * @param prenum MIDI preset number (0-127)
    * @return Should return an allocated virtual preset or NULL if it could not
    *   be found.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/include/fluidsynth.cmake 
new/fluidsynth-1.1.10/include/fluidsynth.cmake
--- old/fluidsynth-1.1.9/include/fluidsynth.cmake       1970-01-01 
01:00:00.000000000 +0100
+++ new/fluidsynth-1.1.10/include/fluidsynth.cmake      2018-02-24 
18:32:40.000000000 +0100
@@ -0,0 +1,118 @@
+/* FluidSynth - A Software Synthesizer
+ *
+ * Copyright (C) 2003  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
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA
+ */
+
+#ifndef _FLUIDSYNTH_H
+#define _FLUIDSYNTH_H
+
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#cmakedefine01 BUILD_SHARED_LIBS
+
+#if (BUILD_SHARED_LIBS == 0)
+    #define FLUIDSYNTH_API // building static lib? no visibility control then
+#elif defined(WIN32)
+    #if defined(FLUIDSYNTH_NOT_A_DLL)
+        #define FLUIDSYNTH_API
+    #elif defined(FLUIDSYNTH_DLL_EXPORTS)
+        #define FLUIDSYNTH_API __declspec(dllexport)
+    #else
+        #define FLUIDSYNTH_API __declspec(dllimport)
+    #endif
+
+#elif defined(MACOS9)
+#define FLUIDSYNTH_API __declspec(export)
+
+#elif defined(__GNUC__)
+#define FLUIDSYNTH_API __attribute__ ((visibility ("default")))
+
+#else
+#define FLUIDSYNTH_API
+
+#endif
+
+#if defined(__GNUC__) || defined(__clang__)
+#    define FLUID_DEPRECATED __attribute__((deprecated))
+#elif defined(_MSC_VER) && _MSC_VER > 1200
+#    define FLUID_DEPRECATED __declspec(deprecated)
+#else
+#    define FLUID_DEPRECATED
+#endif
+
+
+/**
+ * @file fluidsynth.h
+ * @brief FluidSynth is a real-time synthesizer designed for SoundFont(R) 
files.
+ *
+ * This is the header of the fluidsynth library and contains the
+ * synthesizer's public API.
+ *
+ * Depending on how you want to use or extend the synthesizer you
+ * will need different API functions. You probably do not need all
+ * of them. Here is what you might want to do:
+ *
+ * - Embedded synthesizer: create a new synthesizer and send MIDI
+ *   events to it. The sound goes directly to the audio output of
+ *   your system.
+ *
+ * - Plugin synthesizer: create a synthesizer and send MIDI events
+ *   but pull the audio back into your application.
+ *
+ * - SoundFont plugin: create a new type of "SoundFont" and allow
+ *   the synthesizer to load your type of SoundFonts.
+ *
+ * - MIDI input: Create a MIDI handler to read the MIDI input on your
+ *   machine and send the MIDI events directly to the synthesizer.
+ *
+ * - MIDI files: Open MIDI files and send the MIDI events to the
+ *   synthesizer.
+ *
+ * - Command lines: You can send textual commands to the synthesizer.
+ *
+ * SoundFont(R) is a registered trademark of E-mu Systems, Inc.
+ */
+
+#include "fluidsynth/types.h"
+#include "fluidsynth/settings.h"
+#include "fluidsynth/synth.h"
+#include "fluidsynth/shell.h"
+#include "fluidsynth/sfont.h"
+#include "fluidsynth/ramsfont.h"
+#include "fluidsynth/audio.h"
+#include "fluidsynth/event.h"
+#include "fluidsynth/midi.h"
+#include "fluidsynth/seq.h"
+#include "fluidsynth/seqbind.h"
+#include "fluidsynth/log.h"
+#include "fluidsynth/misc.h"
+#include "fluidsynth/mod.h"
+#include "fluidsynth/gen.h"
+#include "fluidsynth/voice.h"
+#include "fluidsynth/version.h"
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _FLUIDSYNTH_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/include/fluidsynth.h 
new/fluidsynth-1.1.10/include/fluidsynth.h
--- old/fluidsynth-1.1.9/include/fluidsynth.h   2018-01-02 16:14:56.000000000 
+0100
+++ new/fluidsynth-1.1.10/include/fluidsynth.h  1970-01-01 01:00:00.000000000 
+0100
@@ -1,113 +0,0 @@
-/* FluidSynth - A Software Synthesizer
- *
- * Copyright (C) 2003  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
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA
- */
-
-#ifndef _FLUIDSYNTH_H
-#define _FLUIDSYNTH_H
-
-#include <stdio.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(WIN32)
-#if defined(FLUIDSYNTH_DLL_EXPORTS)
-#define FLUIDSYNTH_API __declspec(dllexport)
-#elif defined(FLUIDSYNTH_NOT_A_DLL)
-#define FLUIDSYNTH_API
-#else
-#define FLUIDSYNTH_API __declspec(dllimport)
-#endif
-
-#elif defined(MACOS9)
-#define FLUIDSYNTH_API __declspec(export)
-
-#elif defined(__GNUC__)
-#define FLUIDSYNTH_API __attribute__ ((visibility ("default")))
-#else
-#define FLUIDSYNTH_API
-#endif
-
-
-#if defined(__GNUC__) || defined(__clang__)
-#    define FLUID_DEPRECATED __attribute__((deprecated))
-#elif defined(_MSC_VER) && _MSC_VER > 1200
-#    define FLUID_DEPRECATED __declspec(deprecated)
-#else
-#    define FLUID_DEPRECATED
-#endif
-
-
-/**
- * @file fluidsynth.h
- * @brief FluidSynth is a real-time synthesizer designed for SoundFont(R) 
files.
- *
- * This is the header of the fluidsynth library and contains the
- * synthesizer's public API.
- *
- * Depending on how you want to use or extend the synthesizer you
- * will need different API functions. You probably do not need all
- * of them. Here is what you might want to do:
- *
- * - Embedded synthesizer: create a new synthesizer and send MIDI
- *   events to it. The sound goes directly to the audio output of
- *   your system.
- *
- * - Plugin synthesizer: create a synthesizer and send MIDI events
- *   but pull the audio back into your application.
- *
- * - SoundFont plugin: create a new type of "SoundFont" and allow
- *   the synthesizer to load your type of SoundFonts.
- *
- * - MIDI input: Create a MIDI handler to read the MIDI input on your
- *   machine and send the MIDI events directly to the synthesizer.
- *
- * - MIDI files: Open MIDI files and send the MIDI events to the
- *   synthesizer.
- *
- * - Command lines: You can send textual commands to the synthesizer.
- *
- * SoundFont(R) is a registered trademark of E-mu Systems, Inc.
- */
-
-#include "fluidsynth/types.h"
-#include "fluidsynth/settings.h"
-#include "fluidsynth/synth.h"
-#include "fluidsynth/shell.h"
-#include "fluidsynth/sfont.h"
-#include "fluidsynth/ramsfont.h"
-#include "fluidsynth/audio.h"
-#include "fluidsynth/event.h"
-#include "fluidsynth/midi.h"
-#include "fluidsynth/seq.h"
-#include "fluidsynth/seqbind.h"
-#include "fluidsynth/log.h"
-#include "fluidsynth/misc.h"
-#include "fluidsynth/mod.h"
-#include "fluidsynth/gen.h"
-#include "fluidsynth/voice.h"
-#include "fluidsynth/version.h"
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _FLUIDSYNTH_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/src/CMakeLists.txt 
new/fluidsynth-1.1.10/src/CMakeLists.txt
--- old/fluidsynth-1.1.9/src/CMakeLists.txt     2018-01-02 16:14:56.000000000 
+0100
+++ new/fluidsynth-1.1.10/src/CMakeLists.txt    2018-02-24 18:32:40.000000000 
+0100
@@ -206,9 +206,26 @@
 )
 
 set ( public_main_HEADER
-    ${CMAKE_SOURCE_DIR}/include/fluidsynth.h
+    ${CMAKE_BINARY_DIR}/include/fluidsynth.h
 )
 
+if ( WIN32 AND NOT MINGW )
+include(generate_product_version)
+generate_product_version(
+    VersionFilesOutputVariable
+    NAME "Fluidsynth"
+    BUNDLE "Fluidsynth"
+    VERSION_MAJOR ${FLUIDSYNTH_VERSION_MAJOR}
+    VERSION_MINOR ${FLUIDSYNTH_VERSION_MINOR}
+    VERSION_PATCH ${FLUIDSYNTH_VERSION_MICRO}
+    VERSION_REVISION 0
+    COMMENTS "Fluidsynth"
+    COMPANY_NAME "Fluidsynth LGPL"
+    ORIGINAL_FILENAME "libfluidsynth.dll"
+    FILE_DESCRIPTION "Fluidsynth"
+)
+endif ( WIN32 AND NOT MINGW )
+
 link_directories (
     ${GLIB_LIBDIR}
     ${GLIB_LIBRARY_DIRS}
@@ -251,6 +268,7 @@
     ${libfluidsynth_SOURCES}
     ${public_HEADERS}
     ${public_main_HEADER}
+    ${VersionFilesOutputVariable}
 )
 
 if ( MACOSX_FRAMEWORK )
@@ -343,8 +361,8 @@
 else ( MACOSX_FRAMEWORK )
   install ( TARGETS fluidsynth libfluidsynth
     RUNTIME DESTINATION ${BIN_INSTALL_DIR}
-    LIBRARY DESTINATION ${LIB_INSTALL_DIR}${LIB_SUFFIX}
-    ARCHIVE DESTINATION ${LIB_INSTALL_DIR}${LIB_SUFFIX}
+    LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+    ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
 )
 endif ( MACOSX_FRAMEWORK )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/src/drivers/fluid_jack.c 
new/fluidsynth-1.1.10/src/drivers/fluid_jack.c
--- old/fluidsynth-1.1.9/src/drivers/fluid_jack.c       2018-01-02 
16:14:56.000000000 +0100
+++ new/fluidsynth-1.1.10/src/drivers/fluid_jack.c      2018-02-24 
18:32:40.000000000 +0100
@@ -80,7 +80,8 @@
 {
   fluid_midi_driver_t driver;
   fluid_jack_client_t *client_ref;
-  jack_port_t *midi_port;
+  int midi_port_count;
+  jack_port_t **midi_port; // array of midi port handles
   fluid_midi_parser_t *parser;
 };
 
@@ -259,15 +260,32 @@
   if (!isaudio)
   {
     fluid_jack_midi_driver_t *dev = driver;
-
-    dev->midi_port = jack_port_register (client, "midi", 
JACK_DEFAULT_MIDI_TYPE,
-                                        JackPortIsInput | JackPortIsTerminal, 
0);
-    if (!dev->midi_port)
+    int midi_channels, ports;
+    
+    fluid_settings_getint(settings, "synth.midi-channels", &midi_channels);
+    ports = midi_channels / 16;
+    if((dev->midi_port = FLUID_ARRAY(jack_port_t*, ports)) == NULL)
     {
-      FLUID_LOG (FLUID_ERR, "Failed to create Jack MIDI port");
-      return FLUID_FAILED;
+        FLUID_LOG (FLUID_ERR, "Out of memory");
+        return FLUID_FAILED;
     }
-
+    
+    for (i = 0; i < ports; i++)
+    {
+        snprintf(name, sizeof(name), "midi_%02d", i);
+        dev->midi_port[i] = jack_port_register (client, name, 
JACK_DEFAULT_MIDI_TYPE,
+                            JackPortIsInput | JackPortIsTerminal, 0);
+        
+        if (dev->midi_port[i] == NULL)
+        {
+            FLUID_LOG (FLUID_ERR, "Failed to create Jack MIDI port");
+            FLUID_FREE(dev->midi_port);
+            dev->midi_port = NULL;
+            return FLUID_FAILED;
+        }
+    }
+    
+    dev->midi_port_count = ports;
     return FLUID_OK;
   }
 
@@ -536,21 +554,28 @@
 
   if (midi_driver)
   {
-    midi_buffer = jack_port_get_buffer (midi_driver->midi_port, 0);
-    event_count = jack_midi_get_event_count (midi_buffer);
-
-    for (event_index = 0; event_index < event_count; event_index++)
+    for (i = 0; i < midi_driver->midi_port_count; i++)
     {
-      jack_midi_event_get (&midi_event, midi_buffer, event_index);
+        midi_buffer = jack_port_get_buffer (midi_driver->midi_port[i], 0);
+        event_count = jack_midi_get_event_count (midi_buffer);
 
-      /* let the parser convert the data into events */
-      for (u = 0; u < midi_event.size; u++)
-      {
-        evt = fluid_midi_parser_parse (midi_driver->parser, 
midi_event.buffer[u]);
-
-        /* send the event to the next link in the chain */
-        if (evt != NULL) midi_driver->driver.handler 
(midi_driver->driver.data, evt);
-      }
+        for (event_index = 0; event_index < event_count; event_index++)
+        {
+            jack_midi_event_get (&midi_event, midi_buffer, event_index);
+
+            /* let the parser convert the data into events */
+            for (u = 0; u < midi_event.size; u++)
+            {
+                evt = fluid_midi_parser_parse (midi_driver->parser, 
midi_event.buffer[u]);
+
+                /* send the event to the next link in the chain */
+                if (evt != NULL)
+                {
+                    fluid_midi_event_set_channel(evt, 
fluid_midi_event_get_channel(evt) + i * 16);
+                    midi_driver->driver.handler (midi_driver->driver.data, 
evt);
+                }
+            }
+        }
     }
   }
 
@@ -684,6 +709,7 @@
   if (dev->parser != NULL)
     delete_fluid_midi_parser (dev->parser);
 
+  FLUID_FREE(dev->midi_port);
   FLUID_FREE (dev);
 
   return FLUID_OK;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/src/fluidsynth.c 
new/fluidsynth-1.1.10/src/fluidsynth.c
--- old/fluidsynth-1.1.9/src/fluidsynth.c       2018-01-02 16:14:56.000000000 
+0100
+++ new/fluidsynth-1.1.10/src/fluidsynth.c      2018-02-24 18:32:40.000000000 
+0100
@@ -56,6 +56,7 @@
 void print_usage(void);
 void print_help(fluid_settings_t *settings);
 void print_welcome(void);
+void print_configure(void);
 
 #if !defined(MACINTOSH)
 static fluid_cmd_handler_t* newclient(void* data, char* addr);
@@ -528,7 +529,7 @@
       else fluid_settings_setstr(settings, "audio.file.type", optarg);
       break;
     case 'V':
-      printf("FluidSynth %s\n", VERSION);
+      print_configure();
       exit (0);
       break;
     case 'v':
@@ -842,11 +843,23 @@
 void
 print_welcome()
 {
-  printf("FluidSynth version %s\n"
-        "Copyright (C) 2000-2018 Peter Hanappe and others.\n"
+  printf("FluidSynth runtime version %s\n"
+        "Copyright (C) 2000-2017 Peter Hanappe and others.\n"
         "Distributed under the LGPL license.\n"
         "SoundFont(R) is a registered trademark of E-mu Systems, Inc.\n\n",
-        FLUIDSYNTH_VERSION);
+        fluid_version_str());
+}
+
+void print_configure()
+{
+    printf("FluidSynth executable version %s\n", FLUIDSYNTH_VERSION);
+    puts("Sample type="
+#ifdef WITH_FLOAT
+    "float"
+#else
+    "double"
+#endif
+    );
 }
 
 /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/src/sfloader/fluid_defsfont.c 
new/fluidsynth-1.1.10/src/sfloader/fluid_defsfont.c
--- old/fluidsynth-1.1.9/src/sfloader/fluid_defsfont.c  2018-01-02 
16:14:56.000000000 +0100
+++ new/fluidsynth-1.1.10/src/sfloader/fluid_defsfont.c 2018-02-24 
18:32:40.000000000 +0100
@@ -3333,6 +3333,7 @@
   int invalid_loops=FALSE;
   int invalid_loopstart;
   int invalid_loopend, loopend_end_mismatch;
+  unsigned int total_samples = sdtachunk_size / 
FLUID_MEMBER_SIZE(fluid_defsfont_t, sampledata[0]);
 
   p = sf->sample;
   while (p)
@@ -3345,14 +3346,14 @@
        * this is as it should be. however we cannot be sure whether any of 
sam.loopend or sam.end
        * is correct. hours of thinking through this have concluded, that it 
would be best practice 
        * to mangle with loops as little as necessary by only making sure 
loopend is within
-       * sdtachunk_size. incorrect soundfont shall preferably fail loudly. */
-      invalid_loopend = (sam->loopend > sdtachunk_size) || (sam->loopstart >= 
sam->loopend);
+       * total_samples. incorrect soundfont shall preferably fail loudly. */
+      invalid_loopend = (sam->loopend > total_samples) || (sam->loopstart >= 
sam->loopend);
       
       loopend_end_mismatch = (sam->loopend > sam->end);
          
       /* if sample is not a ROM sample and end is over the sample data chunk
          or sam start is greater than 4 less than the end (at least 4 samples) 
*/
-      if ((!(sam->sampletype & FLUID_SAMPLETYPE_ROM) && sam->end > 
sdtachunk_size)
+      if ((!(sam->sampletype & FLUID_SAMPLETYPE_ROM) && sam->end > 
total_samples)
           || sam->start > (sam->end - 4))
       {
           FLUID_LOG (FLUID_WARN, _("Sample '%s' start/end file positions are 
invalid,"
@@ -3394,8 +3395,7 @@
              * valid sample will be played */
             sam->loopend = sam->end;
                }
-         
-          if(loopend_end_mismatch)
+          else if(loopend_end_mismatch)
                {
             FLUID_LOG (FLUID_DBG, _("Sample '%s' has invalid loop stop '%d',"
               " sample stop at '%d', using it anyway"), sam->name, 
sam->loopend, sam->end);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/src/utils/fluid_sys.c 
new/fluidsynth-1.1.10/src/utils/fluid_sys.c
--- old/fluidsynth-1.1.9/src/utils/fluid_sys.c  2018-01-02 16:14:56.000000000 
+0100
+++ new/fluidsynth-1.1.10/src/utils/fluid_sys.c 2018-02-24 18:32:40.000000000 
+0100
@@ -342,25 +342,33 @@
  * @param filename Path to the file to check
  * @return TRUE if it could be a SoundFont, FALSE otherwise
  *
- * The current implementation only checks for the "RIFF" header in the file.
- * It is useful only to distinguish between SoundFont and MIDI files.
+ * @note The current implementation only checks for the "RIFF" header in the 
file.
+ * Version >1.1.9 also checks for "sfbk" header.
+ * It is useful to distinguish between SoundFont and other (e.g. MIDI) files.
  */
 int
 fluid_is_soundfont(const char *filename)
 {
   FILE* fp = fopen(filename, "rb");
-  char id[4];
+  char riff_id[4], sfbk_id[4];
 
   if (fp == NULL) {
     return 0;
   }
-  if (fread((void*) id, 1, 4, fp) != 4) {
-    fclose(fp);
-    return 0;
+  if((fread((void*) riff_id, 1, sizeof(riff_id), fp) != sizeof(riff_id)) ||
+     (fseek(fp, 4, SEEK_CUR) != 0) || 
+     (fread((void*) sfbk_id, 1, sizeof(sfbk_id), fp) != sizeof(sfbk_id)))
+  {
+      goto error_rec;
   }
+  
   fclose(fp);
-
-  return strncmp(id, "RIFF", 4) == 0;
+  return (FLUID_STRNCMP(riff_id, "RIFF", sizeof(riff_id)) == 0) &&
+         (FLUID_STRNCMP(sfbk_id, "sfbk", sizeof(sfbk_id)) == 0);
+  
+error_rec:
+    fclose(fp);
+    return 0;
 }
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fluidsynth-1.1.9/src/utils/fluid_sys.h 
new/fluidsynth-1.1.10/src/utils/fluid_sys.h
--- old/fluidsynth-1.1.9/src/utils/fluid_sys.h  2018-01-02 16:14:56.000000000 
+0100
+++ new/fluidsynth-1.1.10/src/utils/fluid_sys.h 2018-02-24 18:32:40.000000000 
+0100
@@ -64,6 +64,7 @@
 #define FLUID_POINTER_TO_INT      GPOINTER_TO_INT
 #define FLUID_INT_TO_POINTER      GINT_TO_POINTER
 #define FLUID_N_ELEMENTS(struct)  (sizeof (struct) / sizeof (struct[0]))
+#define FLUID_MEMBER_SIZE(struct, member)  ( sizeof (((struct *)0)->member) )
 
 #define FLUID_IS_BIG_ENDIAN       (G_BYTE_ORDER == G_BIG_ENDIAN)
 


Reply via email to