Hello community,

here is the log from the commit of package libopenmpt for openSUSE:Factory 
checked in at 2020-02-03 11:12:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libopenmpt (Old)
 and      /work/SRC/openSUSE:Factory/.libopenmpt.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libopenmpt"

Mon Feb  3 11:12:04 2020 rev:23 rq:768831 version:0.4.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/libopenmpt/libopenmpt.changes    2019-10-10 
11:51:16.367667190 +0200
+++ /work/SRC/openSUSE:Factory/.libopenmpt.new.26092/libopenmpt.changes 
2020-02-03 11:12:13.981812019 +0100
@@ -1,0 +2,10 @@
+Thu Jan 30 16:04:28 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.4.11:
+  * The “date” metadata could contain a bogus date for some older IT files.
+  * Do not apply global volume ramping from initial global volume when seeking.
+  * MTM: Sample loop length was off by one.
+  * PSM: Sample loop length was off by one in most files.
+  * MOD: Fix initial instrument change with no note playing.
+
+-------------------------------------------------------------------

Old:
----
  libopenmpt-0.4.9+release.autotools.tar.gz

New:
----
  libopenmpt-0.4.11+release.autotools.tar.gz

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

Other differences:
------------------
++++++ libopenmpt.spec ++++++
--- /var/tmp/diff_new_pack.VXW9BA/_old  2020-02-03 11:12:14.757812412 +0100
+++ /var/tmp/diff_new_pack.VXW9BA/_new  2020-02-03 11:12:14.757812412 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package libopenmpt
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,9 +19,8 @@
 %define libplug libmodplug1
 %define libopenmpt libopenmpt0
 %define libopenmpt_modplug libopenmpt_modplug1
-%bcond_without mpg123
 Name:           libopenmpt
-Version:        0.4.9
+Version:        0.4.11
 Release:        0
 Summary:        C++ and C library to decode tracker music files
 License:        BSD-3-Clause
@@ -40,6 +39,7 @@
 BuildRequires:  pkgconfig(alsa)
 BuildRequires:  pkgconfig(flac)
 BuildRequires:  pkgconfig(flac++)
+BuildRequires:  pkgconfig(libmpg123)
 BuildRequires:  pkgconfig(libpulse)
 BuildRequires:  pkgconfig(portaudio-2.0)
 BuildRequires:  pkgconfig(sdl2)
@@ -47,9 +47,6 @@
 BuildRequires:  pkgconfig(vorbis)
 BuildRequires:  pkgconfig(vorbisfile)
 BuildRequires:  pkgconfig(zlib)
-%if %{with mpg123}
-BuildRequires:  pkgconfig(libmpg123)
-%endif
 
 %description
 libopenmpt is a C++ and C library to decode tracker music files
@@ -133,11 +130,7 @@
     --enable-libmodplug \
     --disable-doxygen-doc \
     --with-zlib \
-%if %{with mpg123}
     --with-mpg123 \
-%else
-    --without-mpg123 \
-%endif
     --with-ogg \
     --with-vorbis \
     --with-vorbisfile \

++++++ libopenmpt-0.4.9+release.autotools.tar.gz -> 
libopenmpt-0.4.11+release.autotools.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/common/CompilerDetect.h 
new/libopenmpt-0.4.11+release.autotools/common/CompilerDetect.h
--- old/libopenmpt-0.4.9+release.autotools/common/CompilerDetect.h      
2019-08-24 15:23:31.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/common/CompilerDetect.h     
2019-12-09 12:00:47.000000000 +0100
@@ -58,7 +58,11 @@
 #elif defined(_MSC_VER)
 
 #define MPT_COMPILER_MSVC                            1
-#if (_MSC_VER >= 1922)
+#if (_MSC_VER >= 1924)
+#define MPT_COMPILER_MSVC_VERSION                    
MPT_COMPILER_MAKE_VERSION2(2019,4)
+#elif (_MSC_VER >= 1923)
+#define MPT_COMPILER_MSVC_VERSION                    
MPT_COMPILER_MAKE_VERSION2(2019,3)
+#elif (_MSC_VER >= 1922)
 #define MPT_COMPILER_MSVC_VERSION                    
MPT_COMPILER_MAKE_VERSION2(2019,2)
 #elif (_MSC_VER >= 1921)
 #define MPT_COMPILER_MSVC_VERSION                    
MPT_COMPILER_MAKE_VERSION2(2019,1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/common/versionNumber.h 
new/libopenmpt-0.4.11+release.autotools/common/versionNumber.h
--- old/libopenmpt-0.4.9+release.autotools/common/versionNumber.h       
2019-10-02 16:24:00.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/common/versionNumber.h      
2019-12-22 17:14:06.000000000 +0100
@@ -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      07
-#define VER_MINORMINOR 04
+#define VER_MINOR      09
+#define VER_MINORMINOR 00
 
 //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.9+release.autotools/configure 
new/libopenmpt-0.4.11+release.autotools/configure
--- old/libopenmpt-0.4.9+release.autotools/configure    2019-10-02 
16:53:46.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/configure   2019-12-22 
20:21:08.000000000 +0100
@@ -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.9+release.autotools.
+# Generated by GNU Autoconf 2.69 for libopenmpt 0.4.11+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.9+release.autotools'
-PACKAGE_STRING='libopenmpt 0.4.9+release.autotools'
+PACKAGE_VERSION='0.4.11+release.autotools'
+PACKAGE_STRING='libopenmpt 0.4.11+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.9+release.autotools to adapt to many 
kinds of systems.
+\`configure' configures libopenmpt 0.4.11+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.9+release.autotools:";;
+     short | recursive ) echo "Configuration of libopenmpt 
0.4.11+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.9+release.autotools
+libopenmpt configure 0.4.11+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.9+release.autotools, which was
+It was created by libopenmpt $as_me 0.4.11+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.9+release.autotools'
+ VERSION='0.4.11+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.9\""; >>confdefs.h
+$as_echo "#define MPT_SVNURL 
\"https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.4.11\""; >>confdefs.h
 
 
-$as_echo "#define MPT_SVNVERSION \"12139\"" >>confdefs.h
+$as_echo "#define MPT_SVNVERSION \"12392\"" >>confdefs.h
 
 
-$as_echo "#define MPT_SVNDATE \"2019-10-02T14:33:59.345896Z\"" >>confdefs.h
+$as_echo "#define MPT_SVNDATE \"2019-12-22T19:09:25.374363Z\"" >>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.9+release.autotools, which was
+This file was extended by libopenmpt $as_me 0.4.11+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.9+release.autotools
+libopenmpt config.status 0.4.11+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.9+release.autotools/configure.ac 
new/libopenmpt-0.4.11+release.autotools/configure.ac
--- old/libopenmpt-0.4.9+release.autotools/configure.ac 2019-10-02 
16:53:36.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/configure.ac        2019-12-22 
20:20:58.000000000 +0100
@@ -1,4 +1,4 @@
-AC_INIT([libopenmpt], [0.4.9+release.autotools], [https://bugs.openmpt.org/], 
[libopenmpt], [https://lib.openmpt.org/])
+AC_INIT([libopenmpt], [0.4.11+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.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_SVNURL], 
["https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.4.11";], [svn 
version])
+AC_DEFINE([MPT_SVNVERSION], ["12392"], [svn version])
+AC_DEFINE([MPT_SVNDATE], ["2019-12-22T19:09:25.374363Z"], [svn date])
 AC_DEFINE([MPT_PACKAGE], [true], [is package])
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/libopenmpt/dox/changelog.md 
new/libopenmpt-0.4.11+release.autotools/libopenmpt/dox/changelog.md
--- old/libopenmpt-0.4.9+release.autotools/libopenmpt/dox/changelog.md  
2019-10-02 16:33:53.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/libopenmpt/dox/changelog.md 
2019-12-22 20:09:19.000000000 +0100
@@ -5,6 +5,21 @@
 For fully detailed change log, please see the source repository directly. This
 is just a high-level summary.
 
+### libopenmpt 0.4.11 (2019-12-22)
+
+ *  MOD: Fix initial instrument change with no note playing. Fixes first 
pattern
+    of Beyond Music by Captain.
+
+### libopenmpt 0.4.10 (2019-10-30)
+
+ *  The "date" metadata could contain a bogus date for some older IT files.
+ *  Do not apply global volume ramping from initial global volume when seeking.
+
+ *  MTM: Sample loop length was off by one.
+ *  PSM: Sample loop length was off by one in most files.
+
+ *  mpg123: Update to v1.25.13 (2019-10-26).
+
 ### libopenmpt 0.4.9 (2019-10-02)
 
  *  [**Sec**] libmodplug: C API: Limit the length of strings copied to the
@@ -16,6 +31,7 @@
     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)
+    
([CVE-2019-17113](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17113))
  *  [**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
@@ -35,7 +51,7 @@
 
  *  J2B: Ignore notes with non-existing instrument (fixes Ending.j2b).
 
- *  mpg123: Update to v1.25.13 (2019-08-24).
+ *  mpg123: Update to v1.25.12 (2019-08-24).
  *  ogg: Update to v1.3.4. (2019-08-31).
  *  flac: Update to v1.3.3. (2019-08-04).
 
@@ -59,6 +75,7 @@
 
  *  [**Sec**] Possible crash during playback due out-of-bounds read in XM and
     MT2 files (r11608).
+    
([CVE-2019-14380](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-14380))
 
  *  Breaking out of a sustain loop through Note-Off sometimes didn't continue 
in
     the regular sample loop.
@@ -81,6 +98,7 @@
 
  *  [**Sec**] Possible crash due to null-pointer access when doing a portamento
     from an OPL instrument to an empty instrument note map slot (r11348).
+    
([CVE-2019-14381](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-14381))
 
  *  [**Bug**] libopenmpt did not compile on Apple platforms in C++17 mode.
 
@@ -95,8 +113,10 @@
 
  *  [**Sec**] DSM: Assertion failure during file parsing with debug STLs
     (r11209).
+    
([CVE-2019-14382](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-14382))
  *  [**Sec**] J2B: Assertion failure during file parsing with debug STLs
     (r11216).
+    
([CVE-2019-14383](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-14383))
 
  *  S3M: Allow volume change of OPL instruments after Note Cut.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/libopenmpt/libopenmpt.hpp 
new/libopenmpt-0.4.11+release.autotools/libopenmpt/libopenmpt.hpp
--- old/libopenmpt-0.4.9+release.autotools/libopenmpt/libopenmpt.hpp    
2018-10-12 16:29:00.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/libopenmpt/libopenmpt.hpp   
2019-10-14 20:00:14.000000000 +0200
@@ -251,7 +251,7 @@
 
 //! Roughly scan the input stream to find out whether libopenmpt might be able 
to open it
 /*!
-  \deprecated Please use openmpt::module::could_open_probability().
+  \deprecated Please use openmpt::could_open_probability().
 */
 LIBOPENMPT_ATTR_DEPRECATED LIBOPENMPT_CXX_API LIBOPENMPT_DEPRECATED double 
could_open_propability( std::istream & stream, double effort = 1.0, 
std::ostream & log = std::clog );
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/libopenmpt/libopenmpt_impl.cpp 
new/libopenmpt-0.4.11+release.autotools/libopenmpt/libopenmpt_impl.cpp
--- old/libopenmpt-0.4.9+release.autotools/libopenmpt/libopenmpt_impl.cpp       
2018-12-06 15:29:05.000000000 +0100
+++ new/libopenmpt-0.4.11+release.autotools/libopenmpt/libopenmpt_impl.cpp      
2019-10-27 13:33:56.000000000 +0100
@@ -1133,7 +1133,7 @@
        } else if ( key == std::string("title") ) {
                return mod_string_to_utf8( m_sndFile->GetTitle() );
        } else if ( key == std::string("date") ) {
-               if ( m_sndFile->GetFileHistory().empty() ) {
+               if ( m_sndFile->GetFileHistory().empty() || 
!m_sndFile->GetFileHistory().back().HasValidDate() ) {
                        return std::string();
                }
                return mpt::ToCharset(mpt::CharsetUTF8, 
m_sndFile->GetFileHistory().back().AsISO8601() );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/libopenmpt/libopenmpt_version.h 
new/libopenmpt-0.4.11+release.autotools/libopenmpt/libopenmpt_version.h
--- old/libopenmpt-0.4.9+release.autotools/libopenmpt/libopenmpt_version.h      
2019-10-02 16:33:53.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/libopenmpt/libopenmpt_version.h     
2019-12-22 20:09:19.000000000 +0100
@@ -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 9
+#define OPENMPT_API_VERSION_PATCH 11
 /*! \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.9+release.autotools/libopenmpt/libopenmpt_version.mk 
new/libopenmpt-0.4.11+release.autotools/libopenmpt/libopenmpt_version.mk
--- old/libopenmpt-0.4.9+release.autotools/libopenmpt/libopenmpt_version.mk     
2019-10-02 16:33:53.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/libopenmpt/libopenmpt_version.mk    
2019-12-22 20:09:19.000000000 +0100
@@ -1,8 +1,8 @@
 LIBOPENMPT_VERSION_MAJOR=0
 LIBOPENMPT_VERSION_MINOR=4
-LIBOPENMPT_VERSION_PATCH=9
+LIBOPENMPT_VERSION_PATCH=11
 LIBOPENMPT_VERSION_PREREL=
 
 LIBOPENMPT_LTVER_CURRENT=1
-LIBOPENMPT_LTVER_REVISION=9
+LIBOPENMPT_LTVER_REVISION=11
 LIBOPENMPT_LTVER_AGE=1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libopenmpt-0.4.9+release.autotools/man/openmpt123.1 
new/libopenmpt-0.4.11+release.autotools/man/openmpt123.1
--- old/libopenmpt-0.4.9+release.autotools/man/openmpt123.1     2019-10-02 
16:53:36.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/man/openmpt123.1    2019-12-22 
20:20:58.000000000 +0100
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.4.
-.TH OPENMPT123 "1" "October 2019" "openmpt123 v0.4.9" "User Commands"
+.TH OPENMPT123 "1" "December 2019" "openmpt123 v0.4.11" "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.9+release.autotools/soundlib/ITTools.cpp 
new/libopenmpt-0.4.11+release.autotools/soundlib/ITTools.cpp
--- old/libopenmpt-0.4.9+release.autotools/soundlib/ITTools.cpp 2018-08-24 
19:25:50.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/ITTools.cpp        
2019-10-27 13:33:56.000000000 +0100
@@ -637,12 +637,15 @@
 {
        // Decode FAT date and time
        MemsetZero(mptHistory.loadDate);
-       mptHistory.loadDate.tm_year = ((fatdate >> 9) & 0x7F) + 80;
-       mptHistory.loadDate.tm_mon = Clamp((fatdate >> 5) & 0x0F, 1, 12) - 1;
-       mptHistory.loadDate.tm_mday = Clamp(fatdate & 0x1F, 1, 31);
-       mptHistory.loadDate.tm_hour = Clamp((fattime >> 11) & 0x1F, 0, 23);
-       mptHistory.loadDate.tm_min = Clamp((fattime >> 5) & 0x3F, 0, 59);
-       mptHistory.loadDate.tm_sec = Clamp((fattime & 0x1F) * 2, 0, 59);
+       if(fatdate != 0 || fattime != 0)
+       {
+               mptHistory.loadDate.tm_year = ((fatdate >> 9) & 0x7F) + 80;
+               mptHistory.loadDate.tm_mon = Clamp((fatdate >> 5) & 0x0F, 1, 
12) - 1;
+               mptHistory.loadDate.tm_mday = Clamp(fatdate & 0x1F, 1, 31);
+               mptHistory.loadDate.tm_hour = Clamp((fattime >> 11) & 0x1F, 0, 
23);
+               mptHistory.loadDate.tm_min = Clamp((fattime >> 5) & 0x3F, 0, 
59);
+               mptHistory.loadDate.tm_sec = Clamp((fattime & 0x1F) * 2, 0, 59);
+       }
        mptHistory.openTime = static_cast<uint32>(runtime * 
(HISTORY_TIMER_PRECISION / 18.2));
 }
 
@@ -651,10 +654,31 @@
 void ITHistoryStruct::ConvertToIT(const FileHistory &mptHistory)
 {
        // Create FAT file dates
-       fatdate = static_cast<uint16>(mptHistory.loadDate.tm_mday | 
((mptHistory.loadDate.tm_mon + 1) << 5) | ((mptHistory.loadDate.tm_year - 80) 
<< 9));
-       fattime = static_cast<uint16>((mptHistory.loadDate.tm_sec / 2) | 
(mptHistory.loadDate.tm_min << 5) | (mptHistory.loadDate.tm_hour << 11));
+       if(mptHistory.HasValidDate())
+       {
+               fatdate = static_cast<uint16>(mptHistory.loadDate.tm_mday | 
((mptHistory.loadDate.tm_mon + 1) << 5) | ((mptHistory.loadDate.tm_year - 80) 
<< 9));
+               fattime = static_cast<uint16>((mptHistory.loadDate.tm_sec / 2) 
| (mptHistory.loadDate.tm_min << 5) | (mptHistory.loadDate.tm_hour << 11));
+       } else
+       {
+               fatdate = 0;
+               fattime = 0;
+       }
        runtime = static_cast<uint32>(mptHistory.openTime * (18.2 / 
HISTORY_TIMER_PRECISION));
 }
 
 
+uint32 DecodeITEditTimer(uint16 cwtv, uint32 editTime)
+{
+       if((cwtv & 0xFFF) >= 0x0208)
+       {
+               editTime ^= 0x4954524B;  // 'ITRK'
+               editTime = (editTime >> 7) | (editTime << (32 - 7));
+               editTime = -(int32)editTime;
+               editTime = (editTime << 4) | (editTime >> (32 - 4));
+               editTime ^= 0x4A54484C;  // 'JTHL'
+       }
+       return editTime;
+}
+
+
 OPENMPT_NAMESPACE_END
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/soundlib/ITTools.h 
new/libopenmpt-0.4.11+release.autotools/soundlib/ITTools.h
--- old/libopenmpt-0.4.9+release.autotools/soundlib/ITTools.h   2018-12-21 
14:11:03.000000000 +0100
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/ITTools.h  2019-10-27 
12:53:12.000000000 +0100
@@ -317,4 +317,7 @@
        }
 };
 
+
+uint32 DecodeITEditTimer(uint16 cwtv, uint32 editTime);
+
 OPENMPT_NAMESPACE_END
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/soundlib/Load_it.cpp 
new/libopenmpt-0.4.11+release.autotools/soundlib/Load_it.cpp
--- old/libopenmpt-0.4.9+release.autotools/soundlib/Load_it.cpp 2019-09-05 
12:47:11.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/Load_it.cpp        
2019-10-27 12:53:12.000000000 +0100
@@ -344,19 +344,19 @@
 
 
 // Get version of Schism Tracker that was used to create an IT/S3M file.
-mpt::ustring CSoundFile::GetSchismTrackerVersion(uint16 cwtv)
+mpt::ustring CSoundFile::GetSchismTrackerVersion(uint16 cwtv, uint32 reserved)
 {
        // Schism Tracker version information in a nutshell:
        // < 0x020: a proper version (files saved by such versions are likely 
very rare)
        // = 0x020: any version between the 0.2a release (2005-04-29?) and 
2007-04-17
        // = 0x050: anywhere from 2007-04-17 to 2009-10-31
        // > 0x050: the number of days since 2009-10-31
+       // = 0xFFF: any version starting from 2020-10-28 (exact version stored 
in reserved value)
 
        cwtv &= 0xFFF;
-       mpt::ustring version;
        if(cwtv > 0x050)
        {
-               int32 date = SchismVersionFromDate<2009, 10, 31>::date + cwtv - 
0x050;
+               int32 date = SchismVersionFromDate<2009, 10, 31>::date + (cwtv 
< 0xFFF ? cwtv - 0x050 : reserved);
                int32 y = static_cast<int32>((Util::mul32to64(10000, date) + 
14780) / 3652425);
                int32 ddd = date - (365 * y + y / 4 - y / 100 + y / 400);
                if(ddd < 0)
@@ -365,15 +365,14 @@
                        ddd = date - (365 * y + y / 4 - y / 100 + y / 400);
                }
                int32 mi = (100 * ddd + 52) / 3060;
-               version = mpt::format(U_("Schism Tracker %1-%2-%3"))(
+               return mpt::format(U_("Schism Tracker %1-%2-%3"))(
                        mpt::ufmt::dec0<4>(y + (mi + 2) / 12),
                        mpt::ufmt::dec0<2>((mi + 2) % 12 + 1),
                        mpt::ufmt::dec0<2>(ddd - (mi * 306 + 5) / 10 + 1));
        } else
        {
-               version = mpt::format(U_("Schism Tracker 
0.%1"))(mpt::ufmt::hex(cwtv));
+               return mpt::format(U_("Schism Tracker 
0.%1"))(mpt::ufmt::hex0<2>(cwtv));
        }
-       return version;
 }
 
 
@@ -1197,16 +1196,8 @@
                                }
                                if(m_FileHistory.empty() && fileHeader.reserved 
!= 0)
                                {
-                                       // Starting from  version 2.07, IT 
encrypts the total edit time of a module in the "reserved" field
-                                       uint32 editTime = fileHeader.reserved;
-                                       if(fileHeader.cwtv >= 0x0208)
-                                       {
-                                               editTime ^= 0x4954524B; // 
'ITRK'
-                                               editTime = (editTime >> 7) | 
(editTime << (32 - 7));
-                                               editTime = -(int32)editTime;
-                                               editTime = (editTime << 4) | 
(editTime >> (32 - 4));
-                                               editTime ^= 0x4A54484C; // 
'JTHL'
-                                       }
+                                       // Starting from  version 2.07, IT 
stores the total edit time of a module in the "reserved" field
+                                       uint32 editTime = 
DecodeITEditTimer(fileHeader.cwtv, fileHeader.reserved);
 
                                        FileHistory hist;
                                        hist.openTime = 
static_cast<uint32>(editTime * (HISTORY_TIMER_PRECISION / 18.2));
@@ -1215,7 +1206,7 @@
                        }
                        break;
                case 1:
-                       madeWithTracker = 
GetSchismTrackerVersion(fileHeader.cwtv);
+                       madeWithTracker = 
GetSchismTrackerVersion(fileHeader.cwtv, fileHeader.reserved);
                        // Hertz in linear mode: Added 2015-01-29, 
https://github.com/schismtracker/schismtracker/commit/671b30311082a0e7df041fca25f989b5d2478f69
                        if(fileHeader.cwtv < SchismVersionFromDate<2015, 01, 
29>::Version())
                                m_playBehaviour.reset(kHertzInLinearMode);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/soundlib/Load_itp.cpp 
new/libopenmpt-0.4.11+release.autotools/soundlib/Load_itp.cpp
--- old/libopenmpt-0.4.9+release.autotools/soundlib/Load_itp.cpp        
2018-12-06 15:29:05.000000000 +0100
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/Load_itp.cpp       
2019-10-10 17:15:42.000000000 +0200
@@ -116,13 +116,13 @@
 
        enum ITPSongFlags
        {
-               ITP_EMBEDMIDICFG        = 0x00001,      // Embed macros in file
-               ITP_ITOLDEFFECTS        = 0x00004,      // Old Impulse Tracker 
effect implementations
-               ITP_ITCOMPATGXX         = 0x00008,      // IT "Compatible Gxx" 
(IT's flag to behave more like other trackers w/r/t portamento effects)
-               ITP_LINEARSLIDES        = 0x00010,      // Linear slides vs. 
Amiga slides
-               ITP_EXFILTERRANGE       = 0x08000,      // Cutoff Filter has 
double frequency range (up to ~10Khz)
-               ITP_ITPROJECT           = 0x20000,      // Is a project file
-               ITP_ITPEMBEDIH          = 0x40000,      // Embed instrument 
headers in project file
+               ITP_EMBEDMIDICFG  = 0x00001,  // Embed macros in file
+               ITP_ITOLDEFFECTS  = 0x00004,  // Old Impulse Tracker effect 
implementations
+               ITP_ITCOMPATGXX   = 0x00008,  // IT "Compatible Gxx" (IT's flag 
to behave more like other trackers w/r/t portamento effects)
+               ITP_LINEARSLIDES  = 0x00010,  // Linear slides vs. Amiga slides
+               ITP_EXFILTERRANGE = 0x08000,  // Cutoff Filter has double 
frequency range (up to ~10Khz)
+               ITP_ITPROJECT     = 0x20000,  // Is a project file
+               ITP_ITPEMBEDIH    = 0x40000,  // Embed instrument headers in 
project file
        };
 
        file.Rewind();
@@ -145,8 +145,7 @@
                return true;
        }
 
-       uint32 version, size;
-       version = hdr.version;
+       const uint32 version = hdr.version;
 
        InitializeGlobals(MOD_TYPE_IT);
        m_playBehaviour.reset();
@@ -161,10 +160,14 @@
        {
                return false;
        }
-       if(songFlags & ITP_ITOLDEFFECTS)        
m_SongFlags.set(SONG_ITOLDEFFECTS);
-       if(songFlags & ITP_ITCOMPATGXX)         
m_SongFlags.set(SONG_ITCOMPATGXX);
-       if(songFlags & ITP_LINEARSLIDES)        
m_SongFlags.set(SONG_LINEARSLIDES);
-       if(songFlags & ITP_EXFILTERRANGE)       
m_SongFlags.set(SONG_EXFILTERRANGE);
+       if(songFlags & ITP_ITOLDEFFECTS)
+               m_SongFlags.set(SONG_ITOLDEFFECTS);
+       if(songFlags & ITP_ITCOMPATGXX)
+               m_SongFlags.set(SONG_ITCOMPATGXX);
+       if(songFlags & ITP_LINEARSLIDES)
+               m_SongFlags.set(SONG_LINEARSLIDES);
+       if(songFlags & ITP_EXFILTERRANGE)
+               m_SongFlags.set(SONG_EXFILTERRANGE);
 
        m_nDefaultGlobalVolume = file.ReadUint32LE();
        m_nSamplePreAmp = file.ReadUint32LE();
@@ -177,7 +180,7 @@
        }
 
        // channel name string length (=MAX_CHANNELNAME)
-       size = file.ReadUint32LE();
+       uint32 size = file.ReadUint32LE();
 
        // Channels' data
        for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++)
@@ -210,7 +213,7 @@
        }
 
        // Instruments' paths
-       if(version <= 0x00000102)
+       if(version <= 0x102)
        {
                size = file.ReadUint32LE();     // path string length
        }
@@ -218,14 +221,14 @@
        std::vector<mpt::PathString> instrPaths(GetNumInstruments());
        for(INSTRUMENTINDEX ins = 0; ins < GetNumInstruments(); ins++)
        {
-               if(version > 0x00000102)
+               if(version > 0x102)
                {
                        size = file.ReadUint32LE();     // path string length
                }
                std::string path;
                file.ReadString<mpt::String::maybeNullTerminated>(path, size);
 #ifdef MODPLUG_TRACKER
-               if(version <= 0x00000102)
+               if(version <= 0x102)
                {
                        instrPaths[ins] = 
mpt::PathString::FromLocaleSilent(path);
                } else
@@ -256,7 +259,7 @@
 
        // modcommand data length
        size = file.ReadUint32LE();
-       if(size != 6)
+       if(size != sizeof(ITPModCommand))
        {
                return false;
        }
@@ -318,7 +321,10 @@
                file.ReadStruct(sampleHeader);
                FileReader sampleData = file.ReadChunk(file.ReadUint32LE());
 
-               if(realSample >= 1 && realSample <= GetNumSamples() && 
!memcmp(sampleHeader.id, "IMPS", 4) && (loadFlags & loadSampleData))
+               if((loadFlags & loadSampleData)
+                  && realSample >= 1 && realSample <= GetNumSamples()
+                  && Samples[realSample].pData.pSample == nullptr
+                  && !memcmp(sampleHeader.id, "IMPS", 4))
                {
                        sampleHeader.ConvertToMPT(Samples[realSample]);
                        
mpt::String::Read<mpt::String::nullTerminated>(m_szNames[realSample], 
sampleHeader.name);
@@ -342,7 +348,7 @@
                        AddToLog(LogWarning, U_("Unable to open instrument: ") 
+ instrPaths[ins].ToUnicode());
                }
 #else
-               AddToLog(LogWarning, mpt::format(U_("Loading external 
instrument %1 ('%2') failed: External instruments are not supported."))(ins, 
instrPaths[ins].ToUnicode()));
+               AddToLog(LogWarning, mpt::format(U_("Loading external 
instrument %1 ('%2') failed: External instruments are not supported."))(ins + 
1, instrPaths[ins].ToUnicode()));
 #endif // MPT_EXTERNAL_SAMPLES
        }
 
@@ -350,7 +356,7 @@
        uint32 code = file.ReadUint32LE();
 
        // Embed instruments' header [v1.01]
-       if(version >= 0x00000101 && (songFlags & ITP_ITPEMBEDIH) && code == 
MagicBE("EBIH"))
+       if(version >= 0x101 && (songFlags & ITP_ITPEMBEDIH) && code == 
MagicBE("EBIH"))
        {
                code = file.ReadUint32LE();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/soundlib/Load_mtm.cpp 
new/libopenmpt-0.4.11+release.autotools/soundlib/Load_mtm.cpp
--- old/libopenmpt-0.4.9+release.autotools/soundlib/Load_mtm.cpp        
2019-02-28 21:53:19.000000000 +0100
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/Load_mtm.cpp       
2019-10-08 21:08:00.000000000 +0200
@@ -54,7 +54,7 @@
                {
                        mptSmp.nLength = length;
                        mptSmp.nLoopStart = loopStart;
-                       mptSmp.nLoopEnd = loopEnd;
+                       mptSmp.nLoopEnd = std::max(loopEnd.get(), uint32(1)) - 
1;
                        LimitMax(mptSmp.nLoopEnd, mptSmp.nLength);
                        if(mptSmp.nLoopStart + 4 >= mptSmp.nLoopEnd) 
mptSmp.nLoopStart = mptSmp.nLoopEnd = 0;
                        if(mptSmp.nLoopEnd) mptSmp.uFlags.set(CHN_LOOP);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/soundlib/Load_psm.cpp 
new/libopenmpt-0.4.11+release.autotools/soundlib/Load_psm.cpp
--- old/libopenmpt-0.4.9+release.autotools/soundlib/Load_psm.cpp        
2018-12-06 15:29:05.000000000 +0100
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/Load_psm.cpp       
2019-10-08 21:08:00.000000000 +0200
@@ -107,10 +107,12 @@
                mptSmp.nC5Speed = c5Freq;
                mptSmp.nLength = sampleLength;
                mptSmp.nLoopStart = loopStart;
-               // It is not entirely clear if/when we should add +1 to the 
loopEnd value.
-               // Sample 8 in the medieval table music of Extreme Pinball and 
CONVERT.EXE v1.36 suggest that we should do so.
-               // But for other tunes it's not correct, e.g. the OMF 2097 
music!
-               mptSmp.nLoopEnd = loopEnd;
+               // Note that we shouldn't add + 1 for MTM conversions here 
(e.g. the OMF 2097 music),
+               // but I think there is no way to figure out the original 
format, and in the case of the OMF 2097 soundtrack
+               // it doesn't make a huge audible difference anyway (no chip 
samples are used).
+               // On the other hand, sample 8 of MUSIC_A.PSM from Extreme 
Pinball will sound detuned if we don't adjust the loop end here.
+               if(loopEnd)
+                       mptSmp.nLoopEnd = loopEnd + 1;
                mptSmp.nVolume = (defaultVolume + 1) * 2;
                mptSmp.uFlags.set(CHN_LOOP, (flags & 0x80) != 0);
                LimitMax(mptSmp.nLoopEnd, mptSmp.nLength);
@@ -189,7 +191,7 @@
 }
 
 
-// Read a Pattern ID (something like "P0  " or "P13 " in the old format, or 
"PATT0   " in Sinaria)
+// Read a Pattern ID (something like "P0  " or "P13 ", or "PATT0   " in 
Sinaria)
 static PATTERNINDEX ReadPSMPatternIndex(FileReader &file, bool &sinariaFormat)
 {
        char patternID[5];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/soundlib/Load_s3m.cpp 
new/libopenmpt-0.4.11+release.autotools/soundlib/Load_s3m.cpp
--- old/libopenmpt-0.4.9+release.autotools/soundlib/Load_s3m.cpp        
2018-12-16 23:16:10.000000000 +0100
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/Load_s3m.cpp       
2019-10-27 12:53:12.000000000 +0100
@@ -277,6 +277,15 @@
                {
                        madeWithTracker = mpt::format(U_("Impulse Tracker 
2.14p%1"))(fileHeader.cwtv - S3MFileHeader::trkIT2_14);
                }
+               if(fileHeader.cwtv >= S3MFileHeader::trkIT2_07 && 
fileHeader.reserved3 != 0)
+               {
+                       // Starting from  version 2.07, IT stores the total 
edit time of a module in the "reserved" field
+                       uint32 editTime = DecodeITEditTimer(fileHeader.cwtv, 
fileHeader.reserved3);
+
+                       FileHistory hist;
+                       hist.openTime = static_cast<uint32>(editTime * 
(HISTORY_TIMER_PRECISION / 18.2));
+                       m_FileHistory.push_back(hist);
+               }
                nonCompatTracker = true;
                m_nMinPeriod = 1;
                break;
@@ -287,7 +296,7 @@
                        m_playBehaviour.set(kST3LimitPeriod);
                } else
                {
-                       madeWithTracker = 
GetSchismTrackerVersion(fileHeader.cwtv);
+                       madeWithTracker = 
GetSchismTrackerVersion(fileHeader.cwtv, fileHeader.reserved2);
                        m_nMinPeriod = 1;
                        isSchism = true;
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/soundlib/ModChannel.cpp 
new/libopenmpt-0.4.11+release.autotools/soundlib/ModChannel.cpp
--- old/libopenmpt-0.4.9+release.autotools/soundlib/ModChannel.cpp      
2019-06-03 22:43:46.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/ModChannel.cpp     
2019-11-01 16:17:56.000000000 +0100
@@ -46,6 +46,7 @@
 
        if(resetMask & resetSetPosAdvanced)
        {
+               increment = SamplePosition(0);
                nPeriod = 0;
                position.Set(0);
                nLength = 0;
@@ -60,7 +61,7 @@
                rightVol = leftVol = 0;
                newRightVol = newLeftVol = 0;
                rightRamp = leftRamp = 0;
-               nVolume = 0;    // Needs to be 0 for SMP_NODEFAULTVOLUME flag
+               nVolume = 0;  // Needs to be 0 for SMP_NODEFAULTVOLUME flag
                nVibratoPos = nTremoloPos = nPanbrelloPos = 0;
                nOldHiOffset = 0;
                nLeftVU = nRightVU = 0;
@@ -89,7 +90,6 @@
                nRestorePanOnNewNote = 0;
                nRestoreCutoffOnNewNote = 0;
                nRestoreResonanceOnNewNote = 0;
-
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libopenmpt-0.4.9+release.autotools/soundlib/OPL.cpp 
new/libopenmpt-0.4.11+release.autotools/soundlib/OPL.cpp
--- old/libopenmpt-0.4.9+release.autotools/soundlib/OPL.cpp     2018-11-12 
22:13:35.000000000 +0100
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/OPL.cpp    2019-11-01 
16:20:50.000000000 +0100
@@ -15,11 +15,9 @@
 
 OPENMPT_NAMESPACE_BEGIN
 
-OPL::OPL()
+OPL::OPL(uint32 samplerate)
 {
-       m_KeyOnBlock.fill(0);
-       m_OPLtoChan.fill(CHANNELINDEX_INVALID);
-       m_ChanToOPL.fill(OPL_CHANNEL_INVALID);
+       Initialize(samplerate);
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libopenmpt-0.4.9+release.autotools/soundlib/OPL.h 
new/libopenmpt-0.4.11+release.autotools/soundlib/OPL.h
--- old/libopenmpt-0.4.9+release.autotools/soundlib/OPL.h       2018-10-28 
19:08:37.000000000 +0100
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/OPL.h      2019-11-01 
16:20:50.000000000 +0100
@@ -67,7 +67,7 @@
                STEREO_BITS      = VOICE_TO_LEFT | VOICE_TO_RIGHT,
        };
 
-       OPL();
+       OPL(uint32 samplerate);
        ~OPL();
 
        void Initialize(uint32 samplerate);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/soundlib/S3MTools.h 
new/libopenmpt-0.4.11+release.autotools/soundlib/S3MTools.h
--- old/libopenmpt-0.4.9+release.autotools/soundlib/S3MTools.h  2018-07-16 
14:07:14.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/S3MTools.h 2019-10-27 
12:53:12.000000000 +0100
@@ -44,6 +44,7 @@
                trkCreamTracker         = 0x7000,
 
                trkST3_20                       = 0x1320,
+               trkIT2_07                       = 0x3207,
                trkIT2_14                       = 0x3214,
                trkBeRoTrackerOld       = 0x4100,       // Used from 2004 to 
2012
                trkCamoto                       = 0xCA00,
@@ -82,7 +83,9 @@
        uint8le  masterVolume;          // Sample Volume (0...127, stereo if 
high bit is set)
        uint8le  ultraClicks;           // Number of channels used for ultra 
click removal
        uint8le  usePanningTable;       // 0xFC => read extended panning table
-       char     reserved2[8];          // More reserved bytes
+       uint16le reserved2;                     // Schism Tracker uses this for 
its extended version information
+       uint32le reserved3;                     // Impulse Tracker hides its 
edit timer here
+       uint16le reserved4;
        uint16le special;                       // Pointer to special custom 
data (unused)
        uint8le  channels[32];          // Channel setup
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/soundlib/Snd_fx.cpp 
new/libopenmpt-0.4.11+release.autotools/soundlib/Snd_fx.cpp
--- old/libopenmpt-0.4.9+release.autotools/soundlib/Snd_fx.cpp  2019-09-28 
01:26:44.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/Snd_fx.cpp 2019-11-01 
16:17:56.000000000 +0100
@@ -1257,6 +1257,7 @@
                {
                        // Target found, or there is no target (i.e. play whole 
song)...
                        m_PlayState = std::move(playState);
+                       m_PlayState.ResetGlobalVolumeRamping();
                        m_PlayState.m_nNextRow = m_PlayState.m_nRow;
                        m_PlayState.m_nFrameDelay = m_PlayState.m_nPatternDelay 
= 0;
                        m_PlayState.m_nTickCount = 
Util::MaxValueOfType(m_PlayState.m_nTickCount) - 1;
@@ -2663,8 +2664,9 @@
                        // Test cases: keyoff+instr.xm, delay.xm
                        bool reloadSampleSettings = 
(m_playBehaviour[kFT2ReloadSampleSettings] && instr != 0);
                        // ProTracker Compatibility: If a sample was stopped 
before, lone instrument numbers can retrigger it
-                       // Test case: PTSwapEmpty.mod
-                       bool keepInstr = (GetType() & (MOD_TYPE_IT | 
MOD_TYPE_MPT)) || (m_playBehaviour[kMODSampleSwap] && !chn.IsSamplePlaying() && 
chn.pModSample != nullptr && !chn.pModSample->HasSampleData());
+                       // Test case: PTSwapEmpty.mod, PTInstrVolume.mod
+                       bool keepInstr = (GetType() & (MOD_TYPE_IT | 
MOD_TYPE_MPT))
+                               || (m_playBehaviour[kMODSampleSwap] && 
!chn.IsSamplePlaying() && (chn.pModSample == nullptr || 
!chn.pModSample->HasSampleData()));
 
                        // Now it's time for some FT2 crap...
                        if (GetType() & (MOD_TYPE_XM | MOD_TYPE_MT2))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/soundlib/Sndfile.cpp 
new/libopenmpt-0.4.11+release.autotools/soundlib/Sndfile.cpp
--- old/libopenmpt-0.4.9+release.autotools/soundlib/Sndfile.cpp 2019-03-06 
17:42:34.000000000 +0100
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/Sndfile.cpp        
2019-11-01 16:20:50.000000000 +0100
@@ -536,10 +536,7 @@
        m_PlayState.m_nCurrentRowsPerBeat = m_nDefaultRowsPerBeat;
        m_PlayState.m_nCurrentRowsPerMeasure = m_nDefaultRowsPerMeasure;
        m_PlayState.m_nGlobalVolume = 
static_cast<int32>(m_nDefaultGlobalVolume);
-       m_PlayState.m_lHighResRampingGlobalVolume = 
m_PlayState.m_nGlobalVolume<<VOLUMERAMPPRECISION;
-       m_PlayState.m_nGlobalVolumeDestination = m_PlayState.m_nGlobalVolume;
-       m_PlayState.m_nSamplesToGlobalVolRampDest = 0;
-       m_PlayState.m_nGlobalVolumeRampAmount = 0;
+       m_PlayState.ResetGlobalVolumeRamping();
        m_PlayState.m_nNextOrder = 0;
        m_PlayState.m_nCurrentOrder = 0;
        m_PlayState.m_nPattern = 0;
@@ -766,11 +763,8 @@
        m_PlayState.m_nMusicSpeed = m_nDefaultSpeed;
        m_PlayState.m_nMusicTempo = m_nDefaultTempo;
 
-       // do not ramp global volume when starting playback
-       m_PlayState.m_lHighResRampingGlobalVolume = 
m_PlayState.m_nGlobalVolume<<VOLUMERAMPPRECISION;
-       m_PlayState.m_nGlobalVolumeDestination = m_PlayState.m_nGlobalVolume;
-       m_PlayState.m_nSamplesToGlobalVolRampDest = 0;
-       m_PlayState.m_nGlobalVolumeRampAmount = 0;
+       // Do not ramp global volume when starting playback
+       m_PlayState.ResetGlobalVolumeRamping();
 
        m_PlayState.m_nNextOrder = 0;
        m_PlayState.m_nNextRow = 0;
@@ -780,7 +774,6 @@
        m_PlayState.m_nFrameDelay = 0;
        m_PlayState.m_nNextPatStartRow = 0;
        m_PlayState.m_lTotalSampleCount = 0;
-       //m_nSeqOverride = 0;
 }
 
 
@@ -1299,7 +1292,8 @@
 
 void CSoundFile::InitOPL()
 {
-       if(!m_opl) m_opl = mpt::make_unique<OPL>();
+       if(!m_opl)
+               m_opl = mpt::make_unique<OPL>(m_MixerSettings.gdwMixingFreq);
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/soundlib/Sndfile.h 
new/libopenmpt-0.4.11+release.autotools/soundlib/Sndfile.h
--- old/libopenmpt-0.4.9+release.autotools/soundlib/Sndfile.h   2019-07-03 
13:32:49.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/Sndfile.h  2019-10-27 
15:47:44.000000000 +0100
@@ -225,13 +225,15 @@
 
 struct FileHistory
 {
-       FileHistory() : openTime(0) { MemsetZero(loadDate); }
+       FileHistory() { MemsetZero(loadDate); }
        // Date when the file was loaded in the the tracker or created.
        tm loadDate;
        // Time the file was open in the editor, in 1/18.2th seconds (frequency 
of a standard DOS timer, to keep compatibility with Impulse Tracker easy).
-       uint32 openTime;
+       uint32 openTime = 0;
        // Return the date as a (possibly truncated if not enough precision is 
available) ISO 8601 formatted date.
        mpt::ustring AsISO8601() const;
+       // Returns true if the date component is valid. Some formats only store 
edit time, not edit date.
+       bool HasValidDate() const { return loadDate.tm_mday != 0; }
 };
 
 
@@ -506,6 +508,14 @@
                {
                        std::fill(std::begin(Chn), std::end(Chn), ModChannel());
                }
+
+               void ResetGlobalVolumeRamping()
+               {
+                       m_lHighResRampingGlobalVolume = m_nGlobalVolume << 
VOLUMERAMPPRECISION;
+                       m_nGlobalVolumeDestination = m_nGlobalVolume;
+                       m_nSamplesToGlobalVolRampDest = 0;
+                       m_nGlobalVolumeRampAmount = 0;
+               }
        };
 
        PlayState m_PlayState;
@@ -820,7 +830,7 @@
        void LoadExtendedSongProperties(FileReader &file, bool 
ignoreChannelCount, bool* pInterpretMptMade = nullptr);
        void LoadMPTMProperties(FileReader &file, uint16 cwtv);
 
-       mpt::ustring GetSchismTrackerVersion(uint16 cwtv);
+       static mpt::ustring GetSchismTrackerVersion(uint16 cwtv, uint32 
reserved);
 
        // Reads extended instrument properties(XM/IT/MPTM).
        // Returns true if extended instrument properties were found.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/soundlib/Tables.cpp 
new/libopenmpt-0.4.11+release.autotools/soundlib/Tables.cpp
--- old/libopenmpt-0.4.9+release.autotools/soundlib/Tables.cpp  2019-09-15 
21:49:59.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/Tables.cpp 2019-10-21 
21:55:35.000000000 +0200
@@ -765,12 +765,9 @@
        {
                initParameterIndependentTables = true;
        }
-       #ifdef MODPLUG_TRACKER
-               if(!StaticTablesInitialized)
-               {
-                       initParameterIndependentTables = true;
-               }
-       #endif // MODPLUG_TRACKER
+#ifdef MODPLUG_TRACKER
+       initParameterIndependentTables = !StaticTablesInitialized;
+#endif  // MODPLUG_TRACKER
 
        MPT_MAYBE_CONSTANT_IF(initParameterIndependentTables)
        {
@@ -802,7 +799,7 @@
 static const CResampler & GetCachedResampler()
 {
        static CResampler s_CachedResampler(true);
-       return s_CachedResampler;       
+       return s_CachedResampler;
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/soundlib/modcommand.cpp 
new/libopenmpt-0.4.11+release.autotools/soundlib/modcommand.cpp
--- old/libopenmpt-0.4.9+release.autotools/soundlib/modcommand.cpp      
2019-07-31 21:06:43.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/modcommand.cpp     
2019-10-14 11:42:50.000000000 +0200
@@ -308,6 +308,7 @@
                        {
                                param = 0x0F | (std::min<PARAM>(0x0E, param & 
0x0F) << 4);
                        }
+                       break;
 
                default:
                        break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/soundlib/pattern.cpp 
new/libopenmpt-0.4.11+release.autotools/soundlib/pattern.cpp
--- old/libopenmpt-0.4.9+release.autotools/soundlib/pattern.cpp 2018-09-15 
15:07:34.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/pattern.cpp        
2019-11-10 15:54:43.000000000 +0100
@@ -240,7 +240,7 @@
                        }
                }
        }
-       m_ModCommands.resize(m_ModCommands.size() / 2);
+       m_ModCommands.resize(m_Rows * nChns);
 
        return true;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.4.9+release.autotools/soundlib/plugins/LFOPlugin.h 
new/libopenmpt-0.4.11+release.autotools/soundlib/plugins/LFOPlugin.h
--- old/libopenmpt-0.4.9+release.autotools/soundlib/plugins/LFOPlugin.h 
2018-12-21 14:11:03.000000000 +0100
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/plugins/LFOPlugin.h        
2019-10-17 15:22:01.000000000 +0200
@@ -145,7 +145,7 @@
 
 public:
        static LFOWaveform ParamToWaveform(float param) { return 
static_cast<LFOWaveform>(mpt::saturate_round<int>(param * 32.0f)); }
-       static float WaveformToParam(LFOWaveform waveform) { return waveform / 
32.0f; }
+       static float WaveformToParam(LFOWaveform waveform) { return 
static_cast<int>(waveform) / 32.0f; }
 };
 
 OPENMPT_NAMESPACE_END
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libopenmpt-0.4.9+release.autotools/soundlib/tuning.h 
new/libopenmpt-0.4.11+release.autotools/soundlib/tuning.h
--- old/libopenmpt-0.4.9+release.autotools/soundlib/tuning.h    2018-12-21 
14:11:03.000000000 +0100
+++ new/libopenmpt-0.4.11+release.autotools/soundlib/tuning.h   2019-10-17 
15:21:39.000000000 +0200
@@ -140,7 +140,7 @@
        {
                CTuningRTI *pT = new CTuningRTI();
                pT->SetName(name);
-               VRPAIR range = std::make_pair(s_StepMinDefault, 
static_cast<NOTEINDEXTYPE>(s_StepMinDefault + s_RatioTableSizeDefault - 1));
+               VRPAIR range = std::make_pair(s_StepMinDefault, 
static_cast<NOTEINDEXTYPE>(static_cast<NOTEINDEXTYPE>(s_StepMinDefault) + 
static_cast<NOTEINDEXTYPE>(s_RatioTableSizeDefault) - 1));
                range.second = std::max(range.second, 
mpt::saturate_cast<NOTEINDEXTYPE>(ratios.size() - 1));
                range.first = 0 - range.second - 1;
                if(pT->CreateGroupGeometric(ratios, groupratio, range, 0) != 
false)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libopenmpt-0.4.9+release.autotools/test/test.cpp 
new/libopenmpt-0.4.11+release.autotools/test/test.cpp
--- old/libopenmpt-0.4.9+release.autotools/test/test.cpp        2019-07-27 
10:25:28.000000000 +0200
+++ new/libopenmpt-0.4.11+release.autotools/test/test.cpp       2019-12-12 
11:36:11.000000000 +0100
@@ -1255,7 +1255,7 @@
 
 #endif
        
-       VERIFY_EQUAL(mpt::rshift_signed<int64>(-0x8000000000000000ll,  1), 
mpt::rshift_signed_standard<int64>(-0x8000000000000000ll,  1));
+       VERIFY_EQUAL(mpt::rshift_signed<int64>(0ull-0x8000000000000000ull,  1), 
mpt::rshift_signed_standard<int64>(0ull-0x8000000000000000ull,  1));
        VERIFY_EQUAL(mpt::rshift_signed<int64>(-0x7fffffffffffffffll,  1), 
mpt::rshift_signed_standard<int64>(-0x7fffffffffffffffll,  1));
        VERIFY_EQUAL(mpt::rshift_signed<int64>(-0x7ffffffffffffffell,  1), 
mpt::rshift_signed_standard<int64>(-0x7ffffffffffffffell,  1));
        VERIFY_EQUAL(mpt::rshift_signed<int64>(                 -1ll,  1), 
mpt::rshift_signed_standard<int64>(                 -1ll,  1));
@@ -1264,7 +1264,7 @@
        VERIFY_EQUAL(mpt::rshift_signed<int64>( 0x7ffffffffffffffell,  1), 
mpt::rshift_signed_standard<int64>( 0x7ffffffffffffffell,  1));
        VERIFY_EQUAL(mpt::rshift_signed<int64>( 0x7fffffffffffffffll,  1), 
mpt::rshift_signed_standard<int64>( 0x7fffffffffffffffll,  1));
 
-       VERIFY_EQUAL(mpt::rshift_signed<int64>(-0x8000000000000000ll, 63), 
mpt::rshift_signed_standard<int64>(-0x8000000000000000ll, 63));
+       VERIFY_EQUAL(mpt::rshift_signed<int64>(0ull-0x8000000000000000ull, 63), 
mpt::rshift_signed_standard<int64>(0ull-0x8000000000000000ull, 63));
        VERIFY_EQUAL(mpt::rshift_signed<int64>(-0x7fffffffffffffffll, 63), 
mpt::rshift_signed_standard<int64>(-0x7fffffffffffffffll, 63));
        VERIFY_EQUAL(mpt::rshift_signed<int64>(-0x7ffffffffffffffell, 63), 
mpt::rshift_signed_standard<int64>(-0x7ffffffffffffffell, 63));
        VERIFY_EQUAL(mpt::rshift_signed<int64>(                 -1ll, 63), 
mpt::rshift_signed_standard<int64>(                 -1ll, 63));
@@ -1273,7 +1273,7 @@
        VERIFY_EQUAL(mpt::rshift_signed<int64>( 0x7ffffffffffffffell, 63), 
mpt::rshift_signed_standard<int64>( 0x7ffffffffffffffell, 63));
        VERIFY_EQUAL(mpt::rshift_signed<int64>( 0x7fffffffffffffffll, 63), 
mpt::rshift_signed_standard<int64>( 0x7fffffffffffffffll, 63));
 
-       VERIFY_EQUAL(mpt::lshift_signed<int64>(-0x8000000000000000ll,  1), 
mpt::lshift_signed_standard<int64>(-0x8000000000000000ll,  1));
+       VERIFY_EQUAL(mpt::lshift_signed<int64>(0ull-0x8000000000000000ull,  1), 
mpt::lshift_signed_standard<int64>(0ull-0x8000000000000000ull,  1));
        VERIFY_EQUAL(mpt::lshift_signed<int64>(-0x7fffffffffffffffll,  1), 
mpt::lshift_signed_standard<int64>(-0x7fffffffffffffffll,  1));
        VERIFY_EQUAL(mpt::lshift_signed<int64>(-0x7ffffffffffffffell,  1), 
mpt::lshift_signed_standard<int64>(-0x7ffffffffffffffell,  1));
        VERIFY_EQUAL(mpt::lshift_signed<int64>(                 -1ll,  1), 
mpt::lshift_signed_standard<int64>(                 -1ll,  1));
@@ -1282,7 +1282,7 @@
        VERIFY_EQUAL(mpt::lshift_signed<int64>( 0x7ffffffffffffffell,  1), 
mpt::lshift_signed_standard<int64>( 0x7ffffffffffffffell,  1));
        VERIFY_EQUAL(mpt::lshift_signed<int64>( 0x7fffffffffffffffll,  1), 
mpt::lshift_signed_standard<int64>( 0x7fffffffffffffffll,  1));
 
-       VERIFY_EQUAL(mpt::lshift_signed<int64>(-0x8000000000000000ll, 63), 
mpt::lshift_signed_standard<int64>(-0x8000000000000000ll, 63));
+       VERIFY_EQUAL(mpt::lshift_signed<int64>(0ull-0x8000000000000000ull, 63), 
mpt::lshift_signed_standard<int64>(0ull-0x8000000000000000ull, 63));
        VERIFY_EQUAL(mpt::lshift_signed<int64>(-0x7fffffffffffffffll, 63), 
mpt::lshift_signed_standard<int64>(-0x7fffffffffffffffll, 63));
        VERIFY_EQUAL(mpt::lshift_signed<int64>(-0x7ffffffffffffffell, 63), 
mpt::lshift_signed_standard<int64>(-0x7ffffffffffffffell, 63));
        VERIFY_EQUAL(mpt::lshift_signed<int64>(                 -1ll, 63), 
mpt::lshift_signed_standard<int64>(                 -1ll, 63));
@@ -1293,7 +1293,7 @@
 
 #if MPT_COMPILER_SHIFT_SIGNED
 
-       VERIFY_EQUAL(mpt::rshift_signed<int64>(-0x8000000000000000ll,  1), 
mpt::rshift_signed_undefined<int64>(-0x8000000000000000ll,  1));
+       VERIFY_EQUAL(mpt::rshift_signed<int64>(0ull-0x8000000000000000ull,  1), 
mpt::rshift_signed_undefined<int64>(0ull-0x8000000000000000ull,  1));
        VERIFY_EQUAL(mpt::rshift_signed<int64>(-0x7fffffffffffffffll,  1), 
mpt::rshift_signed_undefined<int64>(-0x7fffffffffffffffll,  1));
        VERIFY_EQUAL(mpt::rshift_signed<int64>(-0x7ffffffffffffffell,  1), 
mpt::rshift_signed_undefined<int64>(-0x7ffffffffffffffell,  1));
        VERIFY_EQUAL(mpt::rshift_signed<int64>(                 -1ll,  1), 
mpt::rshift_signed_undefined<int64>(                 -1ll,  1));
@@ -1302,7 +1302,7 @@
        VERIFY_EQUAL(mpt::rshift_signed<int64>( 0x7ffffffffffffffell,  1), 
mpt::rshift_signed_undefined<int64>( 0x7ffffffffffffffell,  1));
        VERIFY_EQUAL(mpt::rshift_signed<int64>( 0x7fffffffffffffffll,  1), 
mpt::rshift_signed_undefined<int64>( 0x7fffffffffffffffll,  1));
 
-       VERIFY_EQUAL(mpt::rshift_signed<int64>(-0x8000000000000000ll, 63), 
mpt::rshift_signed_undefined<int64>(-0x8000000000000000ll, 63));
+       VERIFY_EQUAL(mpt::rshift_signed<int64>(0ull-0x8000000000000000ull, 63), 
mpt::rshift_signed_undefined<int64>(0ull-0x8000000000000000ull, 63));
        VERIFY_EQUAL(mpt::rshift_signed<int64>(-0x7fffffffffffffffll, 63), 
mpt::rshift_signed_undefined<int64>(-0x7fffffffffffffffll, 63));
        VERIFY_EQUAL(mpt::rshift_signed<int64>(-0x7ffffffffffffffell, 63), 
mpt::rshift_signed_undefined<int64>(-0x7ffffffffffffffell, 63));
        VERIFY_EQUAL(mpt::rshift_signed<int64>(                 -1ll, 63), 
mpt::rshift_signed_undefined<int64>(                 -1ll, 63));
@@ -1311,7 +1311,7 @@
        VERIFY_EQUAL(mpt::rshift_signed<int64>( 0x7ffffffffffffffell, 63), 
mpt::rshift_signed_undefined<int64>( 0x7ffffffffffffffell, 63));
        VERIFY_EQUAL(mpt::rshift_signed<int64>( 0x7fffffffffffffffll, 63), 
mpt::rshift_signed_undefined<int64>( 0x7fffffffffffffffll, 63));
 
-       VERIFY_EQUAL(mpt::lshift_signed<int64>(-0x8000000000000000ll,  1), 
mpt::lshift_signed_undefined<int64>(-0x8000000000000000ll,  1));
+       VERIFY_EQUAL(mpt::lshift_signed<int64>(0ull-0x8000000000000000ull,  1), 
mpt::lshift_signed_undefined<int64>(0ull-0x8000000000000000ull,  1));
        VERIFY_EQUAL(mpt::lshift_signed<int64>(-0x7fffffffffffffffll,  1), 
mpt::lshift_signed_undefined<int64>(-0x7fffffffffffffffll,  1));
        VERIFY_EQUAL(mpt::lshift_signed<int64>(-0x7ffffffffffffffell,  1), 
mpt::lshift_signed_undefined<int64>(-0x7ffffffffffffffell,  1));
        VERIFY_EQUAL(mpt::lshift_signed<int64>(                 -1ll,  1), 
mpt::lshift_signed_undefined<int64>(                 -1ll,  1));
@@ -1320,7 +1320,7 @@
        VERIFY_EQUAL(mpt::lshift_signed<int64>( 0x7ffffffffffffffell,  1), 
mpt::lshift_signed_undefined<int64>( 0x7ffffffffffffffell,  1));
        VERIFY_EQUAL(mpt::lshift_signed<int64>( 0x7fffffffffffffffll,  1), 
mpt::lshift_signed_undefined<int64>( 0x7fffffffffffffffll,  1));
 
-       VERIFY_EQUAL(mpt::lshift_signed<int64>(-0x8000000000000000ll, 63), 
mpt::lshift_signed_undefined<int64>(-0x8000000000000000ll, 63));
+       VERIFY_EQUAL(mpt::lshift_signed<int64>(0ull-0x8000000000000000ull, 63), 
mpt::lshift_signed_undefined<int64>(0ull-0x8000000000000000ull, 63));
        VERIFY_EQUAL(mpt::lshift_signed<int64>(-0x7fffffffffffffffll, 63), 
mpt::lshift_signed_undefined<int64>(-0x7fffffffffffffffll, 63));
        VERIFY_EQUAL(mpt::lshift_signed<int64>(-0x7ffffffffffffffell, 63), 
mpt::lshift_signed_undefined<int64>(-0x7ffffffffffffffell, 63));
        VERIFY_EQUAL(mpt::lshift_signed<int64>(                 -1ll, 63), 
mpt::lshift_signed_undefined<int64>(                 -1ll, 63));


Reply via email to