Hello community, here is the log from the commit of package libopenmpt for openSUSE:Factory checked in at 2019-10-10 11:51:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libopenmpt (Old) and /work/SRC/openSUSE:Factory/.libopenmpt.new.2352 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libopenmpt" Thu Oct 10 11:51:14 2019 rev:22 rq:736008 version:0.4.9 Changes: -------- --- /work/SRC/openSUSE:Factory/libopenmpt/libopenmpt.changes 2019-08-15 12:28:24.858547244 +0200 +++ /work/SRC/openSUSE:Factory/.libopenmpt.new.2352/libopenmpt.changes 2019-10-10 11:51:16.367667190 +0200 @@ -1,0 +2,31 @@ +Thu Oct 3 00:56:00 UTC 2019 - Martin Herkt <9+suse@cirno.systems> + +- Update to version 0.4.9 bsc#1153102 CVE-2019-17113 + * [Sec] libmodplug: C API: Limit the length of strings copied to + the output buffer of ModPlug_InstrumentName() and + ModPlug_SampleName() to 32 bytes (including terminating null) + as is done by original libmodplug. This avoids potential buffer + overflows in software relying on this limit instead of querying + the required buffer size beforehand. libopenmpt can return + strings longer than 32 bytes here beacuse the internal limit of + 32 bytes applies to strings encoded in arbitrary character + encodings but the API returns them converted to UTF-8, which + can be longer. (reported by Antonio Morales Maldonado of Semmle + Security Research Team) (r12129) + * [Sec] libmodplug: C++ API: Do not return 0 in + CSoundFile::GetSampleName() and CSoundFile::GetInstrumentName() + when a null output pointer is provided. This behaviour differed + from libmodplug and made it impossible to determine the + required buffer size. (r12130) + +------------------------------------------------------------------- +Tue Oct 1 00:21:48 UTC 2019 - Martin Herkt <9+suse@cirno.systems> + +- Update to version 0.4.8: + * [Sec] Possible crash due to out-of-bounds read when playing an + OPL note with active filter in S3M or MPTM files (r12118). +- Update to version 0.4.7: + * J2B: Ignore notes with non-existing instrument + (fixes Ending.j2b) + +------------------------------------------------------------------- Old: ---- libopenmpt-0.4.6+release.autotools.tar.gz New: ---- libopenmpt-0.4.9+release.autotools.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libopenmpt.spec ++++++ --- /var/tmp/diff_new_pack.IcAAU9/_old 2019-10-10 11:51:17.019665459 +0200 +++ /var/tmp/diff_new_pack.IcAAU9/_new 2019-10-10 11:51:17.023665449 +0200 @@ -21,7 +21,7 @@ %define libopenmpt_modplug libopenmpt_modplug1 %bcond_without mpg123 Name: libopenmpt -Version: 0.4.6 +Version: 0.4.9 Release: 0 Summary: C++ and C library to decode tracker music files License: BSD-3-Clause ++++++ libopenmpt-0.4.6+release.autotools.tar.gz -> libopenmpt-0.4.9+release.autotools.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/common/BuildSettings.h new/libopenmpt-0.4.9+release.autotools/common/BuildSettings.h --- old/libopenmpt-0.4.6+release.autotools/common/BuildSettings.h 2018-09-15 15:07:34.000000000 +0200 +++ new/libopenmpt-0.4.9+release.autotools/common/BuildSettings.h 2019-08-25 16:46:28.000000000 +0200 @@ -578,6 +578,10 @@ #define NO_DMO #endif +#if defined(ENABLE_ASM) || !defined(NO_VST) +#define MPT_ENABLE_ALIGNED_ALLOC +#endif + #if defined(MODPLUG_TRACKER) && !defined(MPT_BUILD_WINESUPPORT) && !defined(MPT_BUILD_WINESUPPORT_WRAPPER) @@ -731,6 +735,24 @@ + + +// standard library quirks + +#if MPT_CXX_AT_LEAST(17) +#if (MPT_COMPILER_GCC || MPT_COMPILER_CLANG) +// we need to detect the standard library via macro __GLIBCXX__ +#include <vector> +#endif +#if MPT_COMPILER_MSVC || MPT_GCC_BEFORE(8,1,0) || MPT_CLANG_BEFORE(5,0,0) || (MPT_COMPILER_GCC && defined(__GLIBCXX__) && (defined(__MINGW32__) || defined(__MINGW64__))) || (MPT_COMPILER_CLANG && defined(__GLIBCXX__)) || (MPT_COMPILER_CLANG && MPT_OS_MACOSX_OR_IOS) || MPT_OS_OPENBSD || MPT_OS_EMSCRIPTEN || MPT_OS_HAIKU || (defined(__clang__) && defined(_MSC_VER)) +#define MPT_COMPILER_QUIRK_NO_ALIGNEDALLOC +#endif +#endif + + + + + // third-party library configuration #if defined(MODPLUG_TRACKER) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/common/CompilerDetect.h new/libopenmpt-0.4.9+release.autotools/common/CompilerDetect.h --- old/libopenmpt-0.4.6+release.autotools/common/CompilerDetect.h 2019-07-26 12:11:44.000000000 +0200 +++ new/libopenmpt-0.4.9+release.autotools/common/CompilerDetect.h 2019-08-24 15:23:31.000000000 +0200 @@ -232,6 +232,8 @@ //#elif TARGET_OS_MAC //#else //#endif +#elif defined(__HAIKU__) + #define MPT_OS_HAIKU 1 #elif defined(__ANDROID__) || defined(ANDROID) #define MPT_OS_ANDROID 1 #elif defined(__linux__) @@ -265,6 +267,9 @@ #ifndef MPT_OS_MACOSX_OR_IOS #define MPT_OS_MACOSX_OR_IOS 0 #endif +#ifndef MPT_OS_HAIKU +#define MPT_OS_HAIKU 0 +#endif #ifndef MPT_OS_ANDROID #define MPT_OS_ANDROID 0 #endif @@ -311,9 +316,3 @@ #define MPT_COMPILER_QUIRK_MSVC_STRINGSTREAM #endif -#if MPT_CXX_AT_LEAST(17) -#if MPT_COMPILER_MSVC || MPT_GCC_BEFORE(8,1,0) || MPT_CLANG_BEFORE(5,0,0) || (MPT_COMPILER_GCC && defined(__GLIBCXX__) && (defined(__MINGW32__) || defined(__MINGW64__))) || (MPT_COMPILER_CLANG && defined(__GLIBCXX__)) || (MPT_COMPILER_CLANG && MPT_OS_MACOSX_OR_IOS) || MPT_OS_OPENBSD || MPT_OS_EMSCRIPTEN || (defined(__clang__) && defined(_MSC_VER)) -#define MPT_COMPILER_QUIRK_NO_ALIGNEDALLOC -#endif -#endif - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/common/mptAlloc.cpp new/libopenmpt-0.4.9+release.autotools/common/mptAlloc.cpp --- old/libopenmpt-0.4.6+release.autotools/common/mptAlloc.cpp 2019-06-19 13:59:11.000000000 +0200 +++ new/libopenmpt-0.4.9+release.autotools/common/mptAlloc.cpp 2019-08-25 16:46:28.000000000 +0200 @@ -30,6 +30,10 @@ +#if defined(MPT_ENABLE_ALIGNED_ALLOC) + + + namespace mpt { @@ -118,4 +122,8 @@ +#endif // MPT_ENABLE_ALIGNED_ALLOC + + + OPENMPT_NAMESPACE_END diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/common/mptAlloc.h new/libopenmpt-0.4.9+release.autotools/common/mptAlloc.h --- old/libopenmpt-0.4.6+release.autotools/common/mptAlloc.h 2019-02-02 22:10:15.000000000 +0100 +++ new/libopenmpt-0.4.9+release.autotools/common/mptAlloc.h 2019-08-25 16:46:28.000000000 +0200 @@ -95,6 +95,10 @@ +#if defined(MPT_ENABLE_ALIGNED_ALLOC) + + + namespace mpt { @@ -259,4 +263,8 @@ +#endif // MPT_ENABLE_ALIGNED_ALLOC + + + OPENMPT_NAMESPACE_END diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/common/mptFileIO.cpp new/libopenmpt-0.4.9+release.autotools/common/mptFileIO.cpp --- old/libopenmpt-0.4.6+release.autotools/common/mptFileIO.cpp 2018-12-22 11:22:35.000000000 +0100 +++ new/libopenmpt-0.4.9+release.autotools/common/mptFileIO.cpp 2019-09-15 22:25:50.000000000 +0200 @@ -515,7 +515,8 @@ return result; } result.first.data = m_File.Lock(); - result.first.size = m_File.GetLength(); + if(result.first.data) + result.first.size = m_File.GetLength(); result.second = &m_Filename; return result; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/common/versionNumber.h new/libopenmpt-0.4.9+release.autotools/common/versionNumber.h --- old/libopenmpt-0.4.6+release.autotools/common/versionNumber.h 2019-08-10 14:11:59.000000000 +0200 +++ new/libopenmpt-0.4.9+release.autotools/common/versionNumber.h 2019-10-02 16:24:00.000000000 +0200 @@ -20,8 +20,8 @@ //Version definitions. The only thing that needs to be changed when changing version number. #define VER_MAJORMAJOR 1 #define VER_MAJOR 28 -#define VER_MINOR 06 -#define VER_MINORMINOR 00 +#define VER_MINOR 07 +#define VER_MINORMINOR 04 //Numerical value of the version. #define MPT_VERSION_CURRENT MAKE_VERSION_NUMERIC(VER_MAJORMAJOR,VER_MAJOR,VER_MINOR,VER_MINORMINOR) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/configure new/libopenmpt-0.4.9+release.autotools/configure --- old/libopenmpt-0.4.6+release.autotools/configure 2019-08-10 18:19:30.000000000 +0200 +++ new/libopenmpt-0.4.9+release.autotools/configure 2019-10-02 16:53:46.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libopenmpt 0.4.6+release.autotools. +# Generated by GNU Autoconf 2.69 for libopenmpt 0.4.9+release.autotools. # # Report bugs to <https://bugs.openmpt.org/>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='libopenmpt' PACKAGE_TARNAME='libopenmpt' -PACKAGE_VERSION='0.4.6+release.autotools' -PACKAGE_STRING='libopenmpt 0.4.6+release.autotools' +PACKAGE_VERSION='0.4.9+release.autotools' +PACKAGE_STRING='libopenmpt 0.4.9+release.autotools' PACKAGE_BUGREPORT='https://bugs.openmpt.org/' PACKAGE_URL='https://lib.openmpt.org/' @@ -1485,7 +1485,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libopenmpt 0.4.6+release.autotools to adapt to many kinds of systems. +\`configure' configures libopenmpt 0.4.9+release.autotools to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1556,7 +1556,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libopenmpt 0.4.6+release.autotools:";; + short | recursive ) echo "Configuration of libopenmpt 0.4.9+release.autotools:";; esac cat <<\_ACEOF @@ -1756,7 +1756,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libopenmpt configure 0.4.6+release.autotools +libopenmpt configure 0.4.9+release.autotools generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2246,7 +2246,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libopenmpt $as_me 0.4.6+release.autotools, which was +It was created by libopenmpt $as_me 0.4.9+release.autotools, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3117,7 +3117,7 @@ # Define the identity of the package. PACKAGE='libopenmpt' - VERSION='0.4.6+release.autotools' + VERSION='0.4.9+release.autotools' cat >>confdefs.h <<_ACEOF @@ -17281,13 +17281,13 @@ -$as_echo "#define MPT_SVNURL \"https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.4.6\"" >>confdefs.h +$as_echo "#define MPT_SVNURL \"https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.4.9\"" >>confdefs.h -$as_echo "#define MPT_SVNVERSION \"11911\"" >>confdefs.h +$as_echo "#define MPT_SVNVERSION \"12139\"" >>confdefs.h -$as_echo "#define MPT_SVNDATE \"2019-08-10T16:17:06.209813Z\"" >>confdefs.h +$as_echo "#define MPT_SVNDATE \"2019-10-02T14:33:59.345896Z\"" >>confdefs.h $as_echo "#define MPT_PACKAGE true" >>confdefs.h @@ -23527,7 +23527,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libopenmpt $as_me 0.4.6+release.autotools, which was +This file was extended by libopenmpt $as_me 0.4.9+release.autotools, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23594,7 +23594,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libopenmpt config.status 0.4.6+release.autotools +libopenmpt config.status 0.4.9+release.autotools configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/configure.ac new/libopenmpt-0.4.9+release.autotools/configure.ac --- old/libopenmpt-0.4.6+release.autotools/configure.ac 2019-08-10 18:19:20.000000000 +0200 +++ new/libopenmpt-0.4.9+release.autotools/configure.ac 2019-10-02 16:53:36.000000000 +0200 @@ -1,4 +1,4 @@ -AC_INIT([libopenmpt], [0.4.6+release.autotools], [https://bugs.openmpt.org/], [libopenmpt], [https://lib.openmpt.org/]) +AC_INIT([libopenmpt], [0.4.9+release.autotools], [https://bugs.openmpt.org/], [libopenmpt], [https://lib.openmpt.org/]) AC_PREREQ([2.68]) AC_CONFIG_MACRO_DIR([m4]) @@ -27,9 +27,9 @@ AC_SUBST([LIBOPENMPT_LTVER_REVISION]) AC_SUBST([LIBOPENMPT_LTVER_AGE]) -AC_DEFINE([MPT_SVNURL], ["https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.4.6"], [svn version]) -AC_DEFINE([MPT_SVNVERSION], ["11911"], [svn version]) -AC_DEFINE([MPT_SVNDATE], ["2019-08-10T16:17:06.209813Z"], [svn date]) +AC_DEFINE([MPT_SVNURL], ["https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.4.9"], [svn version]) +AC_DEFINE([MPT_SVNVERSION], ["12139"], [svn version]) +AC_DEFINE([MPT_SVNDATE], ["2019-10-02T14:33:59.345896Z"], [svn date]) AC_DEFINE([MPT_PACKAGE], [true], [is package]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/libopenmpt/dox/changelog.md new/libopenmpt-0.4.9+release.autotools/libopenmpt/dox/changelog.md --- old/libopenmpt-0.4.6+release.autotools/libopenmpt/dox/changelog.md 2019-08-10 18:17:01.000000000 +0200 +++ new/libopenmpt-0.4.9+release.autotools/libopenmpt/dox/changelog.md 2019-10-02 16:33:53.000000000 +0200 @@ -5,6 +5,40 @@ For fully detailed change log, please see the source repository directly. This is just a high-level summary. +### libopenmpt 0.4.9 (2019-10-02) + + * [**Sec**] libmodplug: C API: Limit the length of strings copied to the + output buffer of `ModPlug_InstrumentName()` and `ModPlug_SampleName()` to 32 + bytes (including terminating null) as is done by original libmodplug. This + avoids potential buffer overflows in software relying on this limit instead + of querying the required buffer size beforehand. libopenmpt can return + strings longer than 32 bytes here beacuse the internal limit of 32 bytes + applies to strings encoded in arbitrary character encodings but the API + returns them converted to UTF-8, which can be longer. (reported by Antonio + Morales Maldonado of Semmle Security Research Team) (r12129) + * [**Sec**] libmodplug: C++ API: Do not return 0 in + `CSoundFile::GetSampleName()` and `CSoundFile::GetInstrumentName()` when a + null output pointer is provided. This behaviour differed from libmodplug and + made it impossible to determine the required buffer size. (r12130) + +### libopenmpt 0.4.8 (2019-09-30) + + * [**Sec**] Possible crash due to out-of-bounds read when playing an OPL note + with active filter in S3M or MPTM files (r12118). + +### libopenmpt 0.4.7 (2019-09-23) + + * [**Bug**] Compilation fix for various platforms that do not provide + `std::aligned_alloc` in C++17 mode. The problematic dependency has been + removed. This should fix build problems on MinGW, OpenBSD, Haiku, and others + for good. + + * J2B: Ignore notes with non-existing instrument (fixes Ending.j2b). + + * mpg123: Update to v1.25.13 (2019-08-24). + * ogg: Update to v1.3.4. (2019-08-31). + * flac: Update to v1.3.3. (2019-08-04). + ### libopenmpt 0.4.6 (2019-08-10) * [**Bug**] Compilation fix for OpenBSD. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/libopenmpt/libopenmpt_modplug.c new/libopenmpt-0.4.9+release.autotools/libopenmpt/libopenmpt_modplug.c --- old/libopenmpt-0.4.6+release.autotools/libopenmpt/libopenmpt_modplug.c 2018-12-25 07:40:59.000000000 +0100 +++ new/libopenmpt-0.4.9+release.autotools/libopenmpt/libopenmpt_modplug.c 2019-10-02 15:40:17.000000000 +0200 @@ -478,53 +478,35 @@ LIBOPENMPT_MODPLUG_API unsigned int ModPlug_SampleName(ModPlugFile* file, unsigned int qual, char* buff) { const char* str; - unsigned int retval; - size_t tmpretval; + char buf[32]; if(!file) return 0; str = openmpt_module_get_sample_name(file->mod,qual-1); - if(!str){ - if(buff){ - *buff = '\0'; - } - return 0; + memset(buf,0,32); + if(str){ + strncpy(buf,str,31); + openmpt_free_string(str); } - tmpretval = strlen(str); - if(tmpretval>=INT_MAX){ - tmpretval = INT_MAX-1; - } - retval = (int)tmpretval; if(buff){ - memcpy(buff,str,retval+1); - buff[retval] = '\0'; + strncpy(buff,buf,32); } - openmpt_free_string(str); - return retval; + return (unsigned int)strlen(buf); } LIBOPENMPT_MODPLUG_API unsigned int ModPlug_InstrumentName(ModPlugFile* file, unsigned int qual, char* buff) { const char* str; - unsigned int retval; - size_t tmpretval; + char buf[32]; if(!file) return 0; str = openmpt_module_get_instrument_name(file->mod,qual-1); - if(!str){ - if(buff){ - *buff = '\0'; - } - return 0; - } - tmpretval = strlen(str); - if(tmpretval>=INT_MAX){ - tmpretval = INT_MAX-1; + memset(buf,0,32); + if(str){ + strncpy(buf,str,31); + openmpt_free_string(str); } - retval = (int)tmpretval; if(buff){ - memcpy(buff,str,retval+1); - buff[retval] = '\0'; + strncpy(buff,buf,32); } - openmpt_free_string(str); - return retval; + return (unsigned int)strlen(buf); } LIBOPENMPT_MODPLUG_API ModPlugNote* ModPlug_GetPattern(ModPlugFile* file, int pattern, unsigned int* numrows) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/libopenmpt/libopenmpt_modplug_cpp.cpp new/libopenmpt-0.4.9+release.autotools/libopenmpt/libopenmpt_modplug_cpp.cpp --- old/libopenmpt-0.4.6+release.autotools/libopenmpt/libopenmpt_modplug_cpp.cpp 2018-12-25 07:40:59.000000000 +0100 +++ new/libopenmpt-0.4.9+release.autotools/libopenmpt/libopenmpt_modplug_cpp.cpp 2019-10-02 15:40:38.000000000 +0200 @@ -304,9 +304,6 @@ UINT CSoundFile::GetSampleName( UINT nSample, LPSTR s ) const { mpcpplog(); - if ( !s ) { - return 0; - } char buf[32]; std::memset( buf, 0, 32 ); if ( mod ) { @@ -315,15 +312,14 @@ std::strncpy( buf, names[ nSample - 1 ].c_str(), 31 ); } } - std::memcpy( s, buf, 32 ); + if ( s ) { + std::strncpy( s, buf, 32 ); + } return static_cast<UINT>( std::strlen( buf ) ); } UINT CSoundFile::GetInstrumentName( UINT nInstr, LPSTR s ) const { mpcpplog(); - if ( !s ) { - return 0; - } char buf[32]; std::memset( buf, 0, 32 ); if ( mod ) { @@ -332,7 +328,9 @@ std::strncpy( buf, names[ nInstr - 1 ].c_str(), 31 ); } } - std::memcpy( s, buf, 32 ); + if ( s ) { + std::strncpy( s, buf, 32 ); + } return static_cast<UINT>( std::strlen( buf ) ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/libopenmpt/libopenmpt_version.h new/libopenmpt-0.4.9+release.autotools/libopenmpt/libopenmpt_version.h --- old/libopenmpt-0.4.6+release.autotools/libopenmpt/libopenmpt_version.h 2019-08-10 18:17:01.000000000 +0200 +++ new/libopenmpt-0.4.9+release.autotools/libopenmpt/libopenmpt_version.h 2019-10-02 16:33:53.000000000 +0200 @@ -19,7 +19,7 @@ /*! \brief libopenmpt minor version number */ #define OPENMPT_API_VERSION_MINOR 4 /*! \brief libopenmpt patch version number */ -#define OPENMPT_API_VERSION_PATCH 6 +#define OPENMPT_API_VERSION_PATCH 9 /*! \brief libopenmpt pre-release tag */ #define OPENMPT_API_VERSION_PREREL "" /*! \brief libopenmpt pre-release flag */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/libopenmpt/libopenmpt_version.mk new/libopenmpt-0.4.9+release.autotools/libopenmpt/libopenmpt_version.mk --- old/libopenmpt-0.4.6+release.autotools/libopenmpt/libopenmpt_version.mk 2019-08-10 18:17:01.000000000 +0200 +++ new/libopenmpt-0.4.9+release.autotools/libopenmpt/libopenmpt_version.mk 2019-10-02 16:33:53.000000000 +0200 @@ -1,8 +1,8 @@ LIBOPENMPT_VERSION_MAJOR=0 LIBOPENMPT_VERSION_MINOR=4 -LIBOPENMPT_VERSION_PATCH=6 +LIBOPENMPT_VERSION_PATCH=9 LIBOPENMPT_VERSION_PREREL= LIBOPENMPT_LTVER_CURRENT=1 -LIBOPENMPT_LTVER_REVISION=6 +LIBOPENMPT_LTVER_REVISION=9 LIBOPENMPT_LTVER_AGE=1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/man/openmpt123.1 new/libopenmpt-0.4.9+release.autotools/man/openmpt123.1 --- old/libopenmpt-0.4.6+release.autotools/man/openmpt123.1 2019-08-10 18:19:20.000000000 +0200 +++ new/libopenmpt-0.4.9+release.autotools/man/openmpt123.1 2019-10-02 16:53:36.000000000 +0200 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. -.TH OPENMPT123 "1" "August 2019" "openmpt123 v0.4.6" "User Commands" +.TH OPENMPT123 "1" "October 2019" "openmpt123 v0.4.9" "User Commands" .SH NAME openmpt123 - command line module music player based on libopenmpt .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/soundlib/Dlsbank.cpp new/libopenmpt-0.4.9+release.autotools/soundlib/Dlsbank.cpp --- old/libopenmpt-0.4.6+release.autotools/soundlib/Dlsbank.cpp 2018-11-01 23:21:49.000000000 +0100 +++ new/libopenmpt-0.4.9+release.autotools/soundlib/Dlsbank.cpp 2019-09-15 21:49:59.000000000 +0200 @@ -563,7 +563,7 @@ const DLSINSTRUMENT *CDLSBank::FindInstrument(bool isDrum, uint32 bank, uint32 program, uint32 key, uint32 *pInsNo) const { - if (m_Instruments.empty()) return NULL; + if (m_Instruments.empty()) return nullptr; for (uint32 iIns=0; iIns<m_Instruments.size(); iIns++) { const DLSINSTRUMENT &dlsIns = m_Instruments[iIns]; @@ -956,7 +956,7 @@ dlsSmp.dwSampleRate = p.dwSampleRate; dlsSmp.byOriginalPitch = p.byOriginalPitch; dlsSmp.chPitchCorrection = static_cast<int8>(Util::muldivr(p.chPitchCorrection, 128, 100)); - if (((p.sfSampleType & 0x7FFF) <= 4) && (p.dwStart < 0x08000000) && (p.dwEnd >= p.dwStart+8)) + if (((p.sfSampleType & 0x7FFF) <= 4) && (p.dwEnd >= p.dwStart + 4)) { dlsSmp.dwLen = (p.dwEnd - p.dwStart) * 2; if ((p.dwEndloop > p.dwStartloop + 7) && (p.dwStartloop >= p.dwStart)) @@ -1192,7 +1192,6 @@ m_szFileName = file.GetFileName(); file.Rewind(); - const uint8 *lpMemFile = file.GetRawData<uint8>(); size_t dwMemLength = file.GetLength(); size_t dwMemPos = 0; if(!file.CanRead(256)) @@ -1397,13 +1396,14 @@ Log("ptbl not present: building table (%d wavelinks)...\n", m_nMaxWaveLink); #endif m_WaveForms.reserve(m_nMaxWaveLink); - dwMemPos = m_dwWavePoolOffset; - while (dwMemPos + sizeof(IFFCHUNK) < dwMemLength) + file.Seek(m_dwWavePoolOffset); + while(m_WaveForms.size() < m_nMaxWaveLink && file.CanRead(sizeof(IFFCHUNK))) { - IFFCHUNK *pchunk = (IFFCHUNK *)(lpMemFile + dwMemPos); - if (pchunk->id == IFFID_LIST) m_WaveForms.push_back(dwMemPos - m_dwWavePoolOffset); - dwMemPos += 8 + pchunk->len; - if (m_WaveForms.size() >= m_nMaxWaveLink) break; + IFFCHUNK chunk; + file.ReadStruct(chunk); + if (chunk.id == IFFID_LIST) + m_WaveForms.push_back(file.GetPosition() - m_dwWavePoolOffset - sizeof(IFFCHUNK)); + file.Skip(chunk.len); } #ifdef DLSBANK_LOG Log("Found %d waveforms\n", m_WaveForms.size()); @@ -1467,13 +1467,13 @@ return false; } - long dwOffset = mpt::saturate_cast<long>(m_WaveForms[nWaveLink] + m_dwWavePoolOffset); mpt::ifstream f(m_szFileName, std::ios::binary); if(!f) { return false; } - if (mpt::IO::SeekAbsolute(f, dwOffset)) + mpt::IO::Offset sampleOffset = mpt::saturate_cast<mpt::IO::Offset>(m_WaveForms[nWaveLink] + m_dwWavePoolOffset); + if(mpt::IO::SeekAbsolute(f, sampleOffset)) { if (m_nType & SOUNDBANK_TYPE_SF2) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/soundlib/Load_it.cpp new/libopenmpt-0.4.9+release.autotools/soundlib/Load_it.cpp --- old/libopenmpt-0.4.6+release.autotools/soundlib/Load_it.cpp 2019-07-07 16:53:58.000000000 +0200 +++ new/libopenmpt-0.4.9+release.autotools/soundlib/Load_it.cpp 2019-09-05 12:47:11.000000000 +0200 @@ -819,14 +819,14 @@ // External sample in MPTM file size_t strLen; file.ReadVarInt(strLen); - if(loadFlags & loadSampleData) + if((loadFlags & loadSampleData) && strLen) { std::string filenameU8; file.ReadString<mpt::String::maybeNullTerminated>(filenameU8, strLen); #if defined(MPT_EXTERNAL_SAMPLES) SetSamplePath(i + 1, mpt::PathString::FromUTF8(filenameU8)); #elif !defined(LIBOPENMPT_BUILD_TEST) - AddToLog(LogWarning, mpt::format(U_("Loading external sample %1 ('%2') failed: External samples are not supported."))(i, mpt::ToUnicode(mpt::CharsetUTF8, filenameU8))); + AddToLog(LogWarning, mpt::format(U_("Loading external sample %1 ('%2') failed: External samples are not supported."))(i + 1, mpt::ToUnicode(mpt::CharsetUTF8, filenameU8))); #endif // MPT_EXTERNAL_SAMPLES } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/soundlib/Load_mid.cpp new/libopenmpt-0.4.9+release.autotools/soundlib/Load_mid.cpp --- old/libopenmpt-0.4.6+release.autotools/soundlib/Load_mid.cpp 2018-12-21 14:11:03.000000000 +0100 +++ new/libopenmpt-0.4.9+release.autotools/soundlib/Load_mid.cpp 2019-09-06 16:21:36.000000000 +0200 @@ -516,6 +516,7 @@ uint8 midiCh = modChnStatus[chn].midiCh; modChnStatus[chn].note = NOTE_NONE; + modChnStatus[chn].sustained = false; midiChn.noteOn[note] = CHANNELINDEX_INVALID; ModCommand &m = patRow[chn]; if(m.note == NOTE_NONE) @@ -953,7 +954,7 @@ // Release notes that are still being held after note-off for(const auto &chnState : modChnStatus) { - if(chnState.midiCh == midiCh && chnState.sustained) + if(chnState.midiCh == midiCh && chnState.sustained && chnState.note != NOTE_NONE) { MIDINoteOff(midiChnStatus[midiCh], modChnStatus, chnState.note - NOTE_MIN, delay, patRow, drumChns); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/soundlib/Load_mo3.cpp new/libopenmpt-0.4.9+release.autotools/soundlib/Load_mo3.cpp --- old/libopenmpt-0.4.6+release.autotools/soundlib/Load_mo3.cpp 2019-02-07 21:15:04.000000000 +0100 +++ new/libopenmpt-0.4.9+release.autotools/soundlib/Load_mo3.cpp 2019-09-21 23:36:48.000000000 +0200 @@ -210,10 +210,16 @@ } if(mptIns.nMidiChannel != MidiNoChannel) { - if(mptIns.wMidiBank < 128) - mptIns.wMidiBank = midiBank + 1; - if(mptIns.nMidiProgram < 128) + if(type == MOD_TYPE_XM) + { mptIns.nMidiProgram = midiPatch + 1; + } else + { + if(midiBank < 128) + mptIns.wMidiBank = midiBank + 1; + if(midiPatch < 128) + mptIns.nMidiProgram = midiPatch + 1; + } mptIns.midiPWD = midiBend; } @@ -1394,7 +1400,7 @@ sampleData.Seek(frame.frameSize); mpegData = sampleData.ReadChunk(sampleData.BytesLeft()); } - + if(ReadMP3Sample(smp, mpegData, true, true) || ReadMediaFoundationSample(smp, mpegData, true)) { if(smpHeader.encoderDelay > 0 && smpHeader.encoderDelay < sample.GetSampleSizeInBytes()) @@ -1579,10 +1585,9 @@ sampleChunk.chunk.Rewind(); FileReader::PinnedRawDataView sampleChunkView = sampleChunk.chunk.GetPinnedRawDataView(); - mergedData.insert(mergedData.end(), mpt::byte_cast<const char*>(sampleChunkView.begin()), mpt::byte_cast<const char*>(sampleChunkView.end())); + mergedData.insert(mergedData.end(), mpt::byte_cast<const char *>(sampleChunkView.begin()), mpt::byte_cast<const char *>(sampleChunkView.end())); #endif - } FileReader mergedDataChunk(mpt::byte_cast<mpt::const_byte_span>(mpt::as_span(mergedData))); @@ -1647,10 +1652,10 @@ { if(sample.uFlags[CHN_16BIT]) { - CopyChannelToInterleaved<SC::Convert<int16, float> >(sample.sample16() + offset * sample.GetNumChannels(), output[chn], channels, decodedSamples, chn); + CopyChannelToInterleaved<SC::Convert<int16, float>>(sample.sample16() + offset * sample.GetNumChannels(), output[chn], channels, decodedSamples, chn); } else { - CopyChannelToInterleaved<SC::Convert<int8, float> >(sample.sample8() + offset * sample.GetNumChannels(), output[chn], channels, decodedSamples, chn); + CopyChannelToInterleaved<SC::Convert<int8, float>>(sample.sample8() + offset * sample.GetNumChannels(), output[chn], channels, decodedSamples, chn); } } } @@ -1687,7 +1692,7 @@ if(sharedHeader) { FileReader::PinnedRawDataView headChunkView = headerChunk.GetPinnedRawDataView(initialRead); - vorb = stb_vorbis_open_pushdata(mpt::byte_cast<const unsigned char*>(headChunkView.data()), mpt::saturate_cast<int>(headChunkView.size()), &consumed, &error, nullptr); + vorb = stb_vorbis_open_pushdata(mpt::byte_cast<const unsigned char *>(headChunkView.data()), mpt::saturate_cast<int>(headChunkView.size()), &consumed, &error, nullptr); headerChunk.Skip(consumed); } FileReader::PinnedRawDataView sampleDataView = sampleData.GetPinnedRawDataView(); @@ -1695,7 +1700,7 @@ std::size_t dataLeft = sampleDataView.size(); if(!sharedHeader) { - vorb = stb_vorbis_open_pushdata(mpt::byte_cast<const unsigned char*>(data), mpt::saturate_cast<int>(dataLeft), &consumed, &error, nullptr); + vorb = stb_vorbis_open_pushdata(mpt::byte_cast<const unsigned char *>(data), mpt::saturate_cast<int>(dataLeft), &consumed, &error, nullptr); sampleData.Skip(consumed); data += consumed; dataLeft -= consumed; @@ -1711,7 +1716,7 @@ { int channels = 0, decodedSamples = 0; float **output; - consumed = stb_vorbis_decode_frame_pushdata(vorb, mpt::byte_cast<const unsigned char*>(data), mpt::saturate_cast<int>(dataLeft), &channels, &output, &decodedSamples); + consumed = stb_vorbis_decode_frame_pushdata(vorb, mpt::byte_cast<const unsigned char *>(data), mpt::saturate_cast<int>(dataLeft), &channels, &output, &decodedSamples); sampleData.Skip(consumed); data += consumed; dataLeft -= consumed; @@ -1721,9 +1726,9 @@ for(int chn = 0; chn < channels; chn++) { if(sample.uFlags[CHN_16BIT]) - CopyChannelToInterleaved<SC::Convert<int16, float> >(sample.sample16() + offset * sample.GetNumChannels(), output[chn], channels, decodedSamples, chn); + CopyChannelToInterleaved<SC::Convert<int16, float>>(sample.sample16() + offset * sample.GetNumChannels(), output[chn], channels, decodedSamples, chn); else - CopyChannelToInterleaved<SC::Convert<int8, float> >(sample.sample8() + offset * sample.GetNumChannels(), output[chn], channels, decodedSamples, chn); + CopyChannelToInterleaved<SC::Convert<int8, float>>(sample.sample8() + offset * sample.GetNumChannels(), output[chn], channels, decodedSamples, chn); } } offset += decodedSamples; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/soundlib/Load_mt2.cpp new/libopenmpt-0.4.9+release.autotools/soundlib/Load_mt2.cpp --- old/libopenmpt-0.4.6+release.autotools/soundlib/Load_mt2.cpp 2019-03-08 21:52:17.000000000 +0100 +++ new/libopenmpt-0.4.9+release.autotools/soundlib/Load_mt2.cpp 2019-09-05 12:47:11.000000000 +0200 @@ -1156,7 +1156,7 @@ } SetSamplePath(i + 1, mpt::PathString::FromLocaleSilent(filename)); #elif !defined(LIBOPENMPT_BUILD_TEST) - AddToLog(LogWarning, mpt::format(U_("Loading external sample %1 ('%2') failed: External samples are not supported."))(i, mpt::ToUnicode(GetCharsetFile(), filename))); + AddToLog(LogWarning, mpt::format(U_("Loading external sample %1 ('%2') failed: External samples are not supported."))(i + 1, mpt::ToUnicode(GetCharsetFile(), filename))); #endif // MPT_EXTERNAL_SAMPLES } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/soundlib/Snd_fx.cpp new/libopenmpt-0.4.9+release.autotools/soundlib/Snd_fx.cpp --- old/libopenmpt-0.4.6+release.autotools/soundlib/Snd_fx.cpp 2019-06-27 23:04:16.000000000 +0200 +++ new/libopenmpt-0.4.9+release.autotools/soundlib/Snd_fx.cpp 2019-09-28 01:26:44.000000000 +0200 @@ -2028,7 +2028,7 @@ if((chn.nCutOff < 0x7F || m_playBehaviour[kITFilterBehaviour]) && useFilter) { int cutoff = SetupChannelFilter(chn, true); - if(cutoff >= 0 && chn.dwFlags[CHN_ADLIB] && m_opl) + if(cutoff >= 0 && chn.dwFlags[CHN_ADLIB] && m_opl && channelHint != CHANNELINDEX_INVALID) m_opl->Volume(channelHint, chn.nCutOff / 2u, true); } } @@ -2638,7 +2638,7 @@ { note = NOTE_NONE; } - } else if((GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT)) && GetNumInstruments() != 0 && ModCommand::IsNoteOrEmpty(static_cast<ModCommand::NOTE>(note))) + } else if((GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT | MOD_TYPE_J2B)) && GetNumInstruments() != 0 && ModCommand::IsNoteOrEmpty(static_cast<ModCommand::NOTE>(note))) { // IT compatibility: Invalid instrument numbers do nothing, but they are remembered for upcoming notes and do not trigger a note in that case. // Test case: InstrumentNumberChange.it @@ -5457,7 +5457,7 @@ bool fading = chn.dwFlags[CHN_NOTEFADE]; // IT compatibility: Really weird combination of envelopes and retrigger (see Storlek's q.it testcase) // Test case: retrig.it - NoteChange(chn, note, m_playBehaviour[kITRetrigger], resetEnv); + NoteChange(chn, note, m_playBehaviour[kITRetrigger], resetEnv, false, nChn); // XM compatibility: Prevent NoteChange from resetting the fade flag in case an instrument number + note-off is present. // Test case: RetrigFade.xm if(fading && GetType() == MOD_TYPE_XM) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/soundlib/Sndmix.cpp new/libopenmpt-0.4.9+release.autotools/soundlib/Sndmix.cpp --- old/libopenmpt-0.4.6+release.autotools/soundlib/Sndmix.cpp 2019-05-24 22:38:19.000000000 +0200 +++ new/libopenmpt-0.4.9+release.autotools/soundlib/Sndmix.cpp 2019-09-15 21:49:59.000000000 +0200 @@ -1817,13 +1817,13 @@ default: if(GetType() != MOD_TYPE_MT2) { - vdelta = ft2VibratoTable[chn.nAutoVibPos & 0xFF]; + vdelta = -ITSinusTable[chn.nAutoVibPos & 0xFF]; } else { // Fix flat-sounding pads in "another worlds" by Eternal Engine. // Vibrato starts at the maximum amplitude of the sine wave // and the vibrato frequency never decreases below the original note's frequency. - vdelta = (ft2VibratoTable[(chn.nAutoVibPos + 192) & 0xFF] + 64) / 2; + vdelta = (-ITSinusTable[(chn.nAutoVibPos + 192) & 0xFF] + 64) / 2; } } int n = (vdelta * chn.nAutoVibDepth) / 256; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/soundlib/Tables.cpp new/libopenmpt-0.4.9+release.autotools/soundlib/Tables.cpp --- old/libopenmpt-0.4.6+release.autotools/soundlib/Tables.cpp 2018-12-06 15:29:05.000000000 +0100 +++ new/libopenmpt-0.4.9+release.autotools/soundlib/Tables.cpp 2019-09-15 21:49:59.000000000 +0200 @@ -476,28 +476,6 @@ }; -const int8 ft2VibratoTable[256] = -{ - 0,-2,-3,-5,-6,-8,-9,-11,-12,-14,-16,-17,-19,-20,-22,-23, - -24,-26,-27,-29,-30,-32,-33,-34,-36,-37,-38,-39,-41,-42, - -43,-44,-45,-46,-47,-48,-49,-50,-51,-52,-53,-54,-55,-56, - -56,-57,-58,-59,-59,-60,-60,-61,-61,-62,-62,-62,-63,-63, - -63,-64,-64,-64,-64,-64,-64,-64,-64,-64,-64,-64,-63,-63, - -63,-62,-62,-62,-61,-61,-60,-60,-59,-59,-58,-57,-56,-56, - -55,-54,-53,-52,-51,-50,-49,-48,-47,-46,-45,-44,-43,-42, - -41,-39,-38,-37,-36,-34,-33,-32,-30,-29,-27,-26,-24,-23, - -22,-20,-19,-17,-16,-14,-12,-11,-9,-8,-6,-5,-3,-2,0, - 2,3,5,6,8,9,11,12,14,16,17,19,20,22,23,24,26,27,29,30, - 32,33,34,36,37,38,39,41,42,43,44,45,46,47,48,49,50,51, - 52,53,54,55,56,56,57,58,59,59,60,60,61,61,62,62,62,63, - 63,63,64,64,64,64,64,64,64,64,64,64,64,63,63,63,62,62, - 62,61,61,60,60,59,59,58,57,56,56,55,54,53,52,51,50,49, - 48,47,46,45,44,43,42,41,39,38,37,36,34,33,32,30,29,27, - 26,24,23,22,20,19,17,16,14,12,11,9,8,6,5,3,2 -}; - - - // round(65536 * 2**(n/768)) // 768 = 64 extra-fine finetune steps for 12 notes // Table content is in 16.16 format @@ -782,7 +760,6 @@ void CResampler::InitializeTablesFromScratch(bool force) { - bool initParameterIndependentTables = false; if(force) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/soundlib/Tables.h new/libopenmpt-0.4.9+release.autotools/soundlib/Tables.h --- old/libopenmpt-0.4.6+release.autotools/soundlib/Tables.h 2018-11-11 15:10:53.000000000 +0100 +++ new/libopenmpt-0.4.9+release.autotools/soundlib/Tables.h 2019-09-15 21:49:59.000000000 +0200 @@ -31,7 +31,6 @@ extern const int8 retrigTable2[16]; extern const uint16 XMPeriodTable[104]; extern const uint32 XMLinearTable[768]; -extern const int8 ft2VibratoTable[256]; extern const uint32 FineLinearSlideUpTable[16]; extern const uint32 FineLinearSlideDownTable[16]; extern const uint32 LinearSlideUpTable[256]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.4.6+release.autotools/soundlib/plugins/PluginMixBuffer.h new/libopenmpt-0.4.9+release.autotools/soundlib/plugins/PluginMixBuffer.h --- old/libopenmpt-0.4.6+release.autotools/soundlib/plugins/PluginMixBuffer.h 2018-11-03 09:00:04.000000000 +0100 +++ new/libopenmpt-0.4.9+release.autotools/soundlib/plugins/PluginMixBuffer.h 2019-08-25 16:46:28.000000000 +0200 @@ -12,6 +12,9 @@ #include "BuildSettings.h" +#include "../../common/mptAlloc.h" + + OPENMPT_NAMESPACE_BEGIN @@ -25,7 +28,11 @@ std::vector<buffer_t *> inputs; // Pointers to input buffers std::vector<buffer_t *> outputs; // Pointers to output buffers +#if defined(MPT_ENABLE_ALIGNED_ALLOC) mpt::aligned_buffer<buffer_t, 16> alignedBuffer; // Aligned buffer pointed into +#else + std::vector<buffer_t> alignedBuffer; +#endif // Return pointer to an aligned buffer const buffer_t *GetBuffer(size_t index) const @@ -56,7 +63,11 @@ outputs.resize(numOutputs); // Create inputs + outputs buffers - alignedBuffer.destructive_resize(bufferSize * (numInputs + numOutputs)); + #if defined(MPT_ENABLE_ALIGNED_ALLOC) + alignedBuffer.destructive_resize(bufferSize * (numInputs + numOutputs)); + #else + alignedBuffer.resize(bufferSize * (numInputs + numOutputs)); + #endif } MPT_EXCEPTION_CATCH_OUT_OF_MEMORY(e) { @@ -65,7 +76,11 @@ inputs.shrink_to_fit(); outputs.clear(); outputs.shrink_to_fit(); - alignedBuffer.destructive_resize(0); + #if defined(MPT_ENABLE_ALIGNED_ALLOC) + alignedBuffer.destructive_resize(0); + #else + alignedBuffer.resize(0); + #endif return false; }