Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package fluidsynth for openSUSE:Factory checked in at 2021-03-21 23:19:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fluidsynth (Old) and /work/SRC/openSUSE:Factory/.fluidsynth.new.2401 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fluidsynth" Sun Mar 21 23:19:13 2021 rev:57 rq:879830 version:2.1.8 Changes: -------- --- /work/SRC/openSUSE:Factory/fluidsynth/fluidsynth.changes 2021-02-01 14:42:11.304709481 +0100 +++ /work/SRC/openSUSE:Factory/.fluidsynth.new.2401/fluidsynth.changes 2021-03-21 23:19:16.420716647 +0100 @@ -1,0 +2,9 @@ +Tue Mar 16 21:30:40 UTC 2021 - Dirk M??ller <dmuel...@suse.com> + +- update to 2.1.8: + * Rapidly changing channel panning could have caused audible artifacts (#768). + * Fix a use-after-free when loading malformed soundfonts (#808). Affects all + versions back to at least 1.1.2. + * The number of allowed LADSPA effect units has been increased. + +------------------------------------------------------------------- Old: ---- fluidsynth-2.1.7.tar.gz New: ---- fluidsynth-2.1.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fluidsynth.spec ++++++ --- /var/tmp/diff_new_pack.whkvzw/_old 2021-03-21 23:19:17.000716847 +0100 +++ /var/tmp/diff_new_pack.whkvzw/_new 2021-03-21 23:19:17.000716847 +0100 @@ -18,7 +18,7 @@ %define sover 2 Name: fluidsynth -Version: 2.1.7 +Version: 2.1.8 Release: 0 Summary: A Real-Time Software Synthesizer That Uses Soundfont(tm) License: LGPL-2.1-or-later ++++++ fluidsynth-2.1.7.tar.gz -> fluidsynth-2.1.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.1.7/CMakeLists.txt new/fluidsynth-2.1.8/CMakeLists.txt --- old/fluidsynth-2.1.7/CMakeLists.txt 2021-01-29 14:37:27.000000000 +0100 +++ new/fluidsynth-2.1.8/CMakeLists.txt 2021-03-15 20:12:51.000000000 +0100 @@ -1,6 +1,6 @@ # FluidSynth - A Software Synthesizer # -# Copyright (C) 2003-2011 Peter Hanappe and others. +# Copyright (C) 2003-2021 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 @@ -29,7 +29,7 @@ # FluidSynth package version set ( FLUIDSYNTH_VERSION_MAJOR 2 ) set ( FLUIDSYNTH_VERSION_MINOR 1 ) -set ( FLUIDSYNTH_VERSION_MICRO 7 ) +set ( FLUIDSYNTH_VERSION_MICRO 8 ) 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 2 ) set ( LIB_VERSION_AGE 3 ) -set ( LIB_VERSION_REVISION 7 ) +set ( LIB_VERSION_REVISION 8 ) 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.1.7/doc/Doxyfile new/fluidsynth-2.1.8/doc/Doxyfile --- old/fluidsynth-2.1.7/doc/Doxyfile 2021-01-29 14:37:27.000000000 +0100 +++ new/fluidsynth-2.1.8/doc/Doxyfile 2021-03-15 20:12:51.000000000 +0100 @@ -5,7 +5,7 @@ #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = libfluidsynth -PROJECT_NUMBER = 2.1.7 +PROJECT_NUMBER = 2.1.8 OUTPUT_DIRECTORY = api CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.1.7/doc/fluidsynth-v20-devdoc.txt new/fluidsynth-2.1.8/doc/fluidsynth-v20-devdoc.txt --- old/fluidsynth-2.1.7/doc/fluidsynth-v20-devdoc.txt 2021-01-29 14:37:27.000000000 +0100 +++ new/fluidsynth-2.1.8/doc/fluidsynth-v20-devdoc.txt 2021-03-15 20:12:51.000000000 +0100 @@ -8,8 +8,8 @@ \author David Henningsson \author Tom Moebert \author Copyright © 2003-2021 Peter Hanappe, Conrad Berh??rster, Antoine Schmitt, Pedro L??pez-Cabanillas, Josh Green, David Henningsson, Tom Moebert -\version Revision 2.1.7 -\date 2021-01-29 +\version Revision 2.1.8 +\date 2021-03-13 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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.1.7/src/bindings/fluid_ladspa.c new/fluidsynth-2.1.8/src/bindings/fluid_ladspa.c --- old/fluidsynth-2.1.7/src/bindings/fluid_ladspa.c 2021-01-29 14:37:27.000000000 +0100 +++ new/fluidsynth-2.1.8/src/bindings/fluid_ladspa.c 2021-03-15 20:12:51.000000000 +0100 @@ -33,7 +33,7 @@ #include <ladspa.h> #define FLUID_LADSPA_MAX_EFFECTS 100 -#define FLUID_LADSPA_MAX_NODES 100 +#define FLUID_LADSPA_MAX_NODES 1000 typedef enum _fluid_ladspa_state_t { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.1.7/src/gentables/make_tables.c new/fluidsynth-2.1.8/src/gentables/make_tables.c --- old/fluidsynth-2.1.7/src/gentables/make_tables.c 2021-01-29 14:37:27.000000000 +0100 +++ new/fluidsynth-2.1.8/src/gentables/make_tables.c 2021-03-15 20:12:51.000000000 +0100 @@ -72,11 +72,11 @@ if (argc < 2) return -1; - open_table(&fp, argv[1], "fluid_conv_tables.c"); + open_table(&fp, argv[1], "fluid_conv_tables.inc.h"); gen_conv_table(fp); fclose(fp); - open_table(&fp, argv[1], "fluid_rvoice_dsp_tables.c"); + open_table(&fp, argv[1], "fluid_rvoice_dsp_tables.inc.h"); gen_rvoice_table_dsp(fp); fclose(fp); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.1.7/src/rvoice/fluid_rvoice.c new/fluidsynth-2.1.8/src/rvoice/fluid_rvoice.c --- old/fluidsynth-2.1.7/src/rvoice/fluid_rvoice.c 2021-01-29 14:37:27.000000000 +0100 +++ new/fluidsynth-2.1.8/src/rvoice/fluid_rvoice.c 2021-03-15 20:12:51.000000000 +0100 @@ -493,7 +493,8 @@ for(i = buffers->count; i <= bufnum; i++) { - buffers->bufs[i].amp = 0.0f; + buffers->bufs[i].target_amp = 0.0f; + buffers->bufs[i].current_amp = 0.0f; } buffers->count = bufnum + 1; @@ -512,7 +513,7 @@ return; } - buffers->bufs[bufnum].amp = value; + buffers->bufs[bufnum].target_amp = value; } DECLARE_FLUID_RVOICE_FUNCTION(fluid_rvoice_buffers_set_mapping) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.1.7/src/rvoice/fluid_rvoice.h new/fluidsynth-2.1.8/src/rvoice/fluid_rvoice.h --- old/fluidsynth-2.1.7/src/rvoice/fluid_rvoice.h 2021-01-29 14:37:27.000000000 +0100 +++ new/fluidsynth-2.1.8/src/rvoice/fluid_rvoice.h 2021-03-15 20:12:51.000000000 +0100 @@ -143,8 +143,14 @@ unsigned int count; /* Number of records in "bufs" */ struct { - fluid_real_t amp; - int mapping; /* Mapping to mixdown buffer index */ + /* the actual, linearly interpolated amplitude with which the dsp sample should be mixed into the buf */ + fluid_real_t current_amp; + + /* the desired amplitude [...] mixed into the buf (directly set by e.g. rapidly changing PAN events) */ + fluid_real_t target_amp; + + /* Mapping to mixdown buffer index */ + int mapping; } bufs[FLUID_RVOICE_MAX_BUFS]; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.1.7/src/rvoice/fluid_rvoice_dsp.c new/fluidsynth-2.1.8/src/rvoice/fluid_rvoice_dsp.c --- old/fluidsynth-2.1.7/src/rvoice/fluid_rvoice_dsp.c 2021-01-29 14:37:27.000000000 +0100 +++ new/fluidsynth-2.1.8/src/rvoice/fluid_rvoice_dsp.c 2021-03-15 20:12:51.000000000 +0100 @@ -21,7 +21,7 @@ #include "fluid_sys.h" #include "fluid_phase.h" #include "fluid_rvoice.h" -#include "fluid_rvoice_dsp_tables.c" +#include "fluid_rvoice_dsp_tables.inc.h" /* Purpose: * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.1.7/src/rvoice/fluid_rvoice_mixer.c new/fluidsynth-2.1.8/src/rvoice/fluid_rvoice_mixer.c --- old/fluidsynth-2.1.7/src/rvoice/fluid_rvoice_mixer.c 2021-01-29 14:37:27.000000000 +0100 +++ new/fluidsynth-2.1.8/src/rvoice/fluid_rvoice_mixer.c 2021-03-15 20:12:51.000000000 +0100 @@ -392,27 +392,65 @@ for(i = 0; i < bufcount; i++) { fluid_real_t *FLUID_RESTRICT buf = get_dest_buf(buffers, i, dest_bufs, dest_bufcount); - fluid_real_t amp = buffers->bufs[i].amp; + fluid_real_t target_amp = buffers->bufs[i].target_amp; + fluid_real_t current_amp = buffers->bufs[i].current_amp; + fluid_real_t amp_incr; - if(buf == NULL || amp == 0.0f) + if(buf == NULL || (current_amp == 0.0f && target_amp == 0.0f)) { continue; } + amp_incr = (target_amp - current_amp) / FLUID_BUFSIZE; + FLUID_ASSERT((uintptr_t)buf % FLUID_DEFAULT_ALIGNMENT == 0); - /* mixdown sample_count samples in the current buffer buf - Note, that this loop could be unrolled by FLUID_BUFSIZE elements */ - #pragma omp simd aligned(dsp_buf,buf:FLUID_DEFAULT_ALIGNMENT) - for(dsp_i = 0; dsp_i < sample_count; dsp_i++) + /* Mixdown sample_count samples in the current buffer buf + * + * For the first FLUID_BUFSIZE samples, we linearly interpolate the buffers amplitude to + * avoid clicks/pops when rapidly changing the channels panning (issue 768). + * + * We could have squashed this into one single loop by using an if clause within the loop body. + * But it seems like having two separate loops is easier for compilers to understand, and therefore + * auto-vectorizing the loops. + */ + if(sample_count < FLUID_BUFSIZE) + { + // scalar loop variant, the voice will have finished afterwards + for(dsp_i = 0; dsp_i < sample_count; dsp_i++) + { + buf[start_block * FLUID_BUFSIZE + dsp_i] += current_amp * dsp_buf[start_block * FLUID_BUFSIZE + dsp_i]; + current_amp += amp_incr; + } + } + else { - // Index by blocks (not by samples) to let the compiler know that we always start accessing - // buf and dsp_buf at the FLUID_BUFSIZE*sizeof(fluid_real_t) byte boundary and never somewhere - // in between. - // A good compiler should understand: Aha, so I don't need to add a peel loop when vectorizing - // this loop. Great. - buf[start_block * FLUID_BUFSIZE + dsp_i] += amp * dsp_buf[start_block * FLUID_BUFSIZE + dsp_i]; + // here goes the vectorizable loop + #pragma omp simd aligned(dsp_buf,buf:FLUID_DEFAULT_ALIGNMENT) + for(dsp_i = 0; dsp_i < FLUID_BUFSIZE; dsp_i++) + { + // We cannot simply increment current_amp by amp_incr during every iteration, as this would create a dependency and prevent vectorization. + buf[start_block * FLUID_BUFSIZE + dsp_i] += (current_amp + amp_incr * dsp_i) * dsp_buf[start_block * FLUID_BUFSIZE + dsp_i]; + } + + // we have reached the target_amp + if(target_amp > 0) + { + /* Note, that this loop could be unrolled by FLUID_BUFSIZE elements */ + #pragma omp simd aligned(dsp_buf,buf:FLUID_DEFAULT_ALIGNMENT) + for(dsp_i = FLUID_BUFSIZE; dsp_i < sample_count; dsp_i++) + { + // Index by blocks (not by samples) to let the compiler know that we always start accessing + // buf and dsp_buf at the FLUID_BUFSIZE*sizeof(fluid_real_t) byte boundary and never somewhere + // in between. + // A good compiler should understand: Aha, so I don't need to add a peel loop when vectorizing + // this loop. Great. + buf[start_block * FLUID_BUFSIZE + dsp_i] += target_amp * dsp_buf[start_block * FLUID_BUFSIZE + dsp_i]; + } + } } + + buffers->bufs[i].current_amp = target_amp; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.1.7/src/sfloader/fluid_sffile.c new/fluidsynth-2.1.8/src/sfloader/fluid_sffile.c --- old/fluidsynth-2.1.7/src/sfloader/fluid_sffile.c 2021-01-29 14:37:27.000000000 +0100 +++ new/fluidsynth-2.1.8/src/sfloader/fluid_sffile.c 2021-03-15 20:12:51.000000000 +0100 @@ -1355,7 +1355,7 @@ * ------------------------------------------------------------------- */ static int load_pgen(SFData *sf, int size) { - fluid_list_t *p, *p2, *p3, *dup, **hz = NULL; + fluid_list_t *p, *p2, *p3, *dup, **hz = NULL, *start_of_zone_list; SFZone *z; SFGen *g; SFGenAmount genval; @@ -1369,7 +1369,7 @@ /* traverse through all presets */ gzone = FALSE; discarded = FALSE; - p2 = ((SFPreset *)(p->data))->zone; + start_of_zone_list = p2 = ((SFPreset *)(p->data))->zone; if(p2) { @@ -1516,11 +1516,13 @@ } else { + p2 = fluid_list_next(p2); /* advance to next zone before deleting the current list element */ /* previous global zone exists, discard */ FLUID_LOG(FLUID_WARN, "Preset '%s': Discarding invalid global zone", ((SFPreset *)(p->data))->name); - *hz = fluid_list_remove(*hz, p2->data); - delete_zone((SFZone *)fluid_list_get(p2)); + fluid_list_remove(start_of_zone_list, z); + delete_zone(z); + continue; } } @@ -1864,7 +1866,7 @@ /* load instrument generators (see load_pgen for loading rules) */ static int load_igen(SFData *sf, int size) { - fluid_list_t *p, *p2, *p3, *dup, **hz = NULL; + fluid_list_t *p, *p2, *p3, *dup, **hz = NULL, *start_of_zone_list; SFZone *z; SFGen *g; SFGenAmount genval; @@ -1878,7 +1880,7 @@ /* traverse through all instruments */ gzone = FALSE; discarded = FALSE; - p2 = ((SFInst *)(p->data))->zone; + start_of_zone_list = p2 = ((SFInst *)(p->data))->zone; if(p2) { @@ -2024,11 +2026,13 @@ } else { + p2 = fluid_list_next(p2); /* advance to next zone before deleting the current list element */ /* previous global zone exists, discard */ FLUID_LOG(FLUID_WARN, "Instrument '%s': Discarding invalid global zone", ((SFInst *)(p->data))->name); - *hz = fluid_list_remove(*hz, p2->data); - delete_zone((SFZone *)fluid_list_get(p2)); + fluid_list_remove(start_of_zone_list, z); + delete_zone(z); + continue; } } @@ -2406,6 +2410,14 @@ if(sf->fcbs->fread(loaded_data, num_samples * sizeof(short), sf->sffd) == FLUID_FAILED) { +#if FLUID_VERSION_CHECK(FLUIDSYNTH_VERSION_MAJOR, FLUIDSYNTH_VERSION_MINOR, FLUIDSYNTH_VERSION_MICRO) < FLUID_VERSION_CHECK(2,2,0) + if((int)(num_samples * sizeof(short)) < 0) + { + FLUID_LOG(FLUID_INFO, + "This SoundFont seems to be bigger than 2GB, which is not supported in this version of fluidsynth. " + "You need to use at least fluidsynth 2.2.0"); + } +#endif FLUID_LOG(FLUID_ERR, "Failed to read sample data"); goto error_exit; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.1.7/src/utils/fluid_conv.c new/fluidsynth-2.1.8/src/utils/fluid_conv.c --- old/fluidsynth-2.1.7/src/utils/fluid_conv.c 2021-01-29 14:37:27.000000000 +0100 +++ new/fluidsynth-2.1.8/src/utils/fluid_conv.c 2021-03-15 20:12:51.000000000 +0100 @@ -20,7 +20,7 @@ #include "fluid_conv.h" #include "fluid_sys.h" -#include "fluid_conv_tables.c" +#include "fluid_conv_tables.inc.h" /* * Converts absolute cents to Hertz