Hello community,

here is the log from the commit of package libopenmpt for openSUSE:Factory 
checked in at 2018-04-22 14:33:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libopenmpt (Old)
 and      /work/SRC/openSUSE:Factory/.libopenmpt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libopenmpt"

Sun Apr 22 14:33:49 2018 rev:7 rq:598004 version:0.3.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/libopenmpt/libopenmpt.changes    2018-03-24 
16:07:31.776477396 +0100
+++ /work/SRC/openSUSE:Factory/.libopenmpt.new/libopenmpt.changes       
2018-04-22 14:33:56.777329484 +0200
@@ -1,0 +2,13 @@
+Thu Apr 19 02:40:17 UTC 2018 - 9+suse@cirno.systems
+
+- Update to 0.3.8
+  * [Sec] Possible out-of-bounds memory read with IT / ITP / MO3
+    files containing pattern loops.
+  * Keep track of active SFx macro during seeking.
+  * The "note cut" duplicate note action did not volume-ramp the
+    previously playing sample.
+  * A song starting with non-existing patterns could not be played.
+  * DSM: Support restart position and 16-bit samples.
+  * DTM: Import global volume.
+
+-------------------------------------------------------------------
@@ -4 +17 @@
-- Version update to 0.3.11:
+- Version update to 0.3.7:

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

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

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

Other differences:
------------------
++++++ libopenmpt.spec ++++++
--- /var/tmp/diff_new_pack.bcrlhF/_old  2018-04-22 14:33:57.581300387 +0200
+++ /var/tmp/diff_new_pack.bcrlhF/_new  2018-04-22 14:33:57.585300243 +0200
@@ -21,7 +21,7 @@
 %define libopenmpt_modplug libopenmpt_modplug1
 %bcond_without mpg123
 Name:           libopenmpt
-Version:        0.3.7
+Version:        0.3.8
 Release:        0
 Summary:        C++ and C library to decode tracker music files
 License:        BSD-3-Clause

++++++ libopenmpt-0.3.7+release.autotools.tar.gz -> 
libopenmpt-0.3.8+release.autotools.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.3.7+release.autotools/common/FileReader.h 
new/libopenmpt-0.3.8+release.autotools/common/FileReader.h
--- old/libopenmpt-0.3.7+release.autotools/common/FileReader.h  2017-09-24 
09:24:38.000000000 +0200
+++ new/libopenmpt-0.3.8+release.autotools/common/FileReader.h  2018-03-20 
17:37:40.000000000 +0100
@@ -349,8 +349,9 @@
                }
        public:
                PinnedRawDataView()
+                       : size_(0)
+                       , pinnedData(nullptr)
                {
-                       return;
                }
                PinnedRawDataView(const FileReader &file)
                {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.3.7+release.autotools/common/versionNumber.h 
new/libopenmpt-0.3.8+release.autotools/common/versionNumber.h
--- old/libopenmpt-0.3.7+release.autotools/common/versionNumber.h       
2018-03-11 13:17:08.000000000 +0100
+++ new/libopenmpt-0.3.8+release.autotools/common/versionNumber.h       
2018-04-08 13:17:57.000000000 +0200
@@ -18,7 +18,7 @@
 //Version definitions. The only thing that needs to be changed when changing 
version number.
 #define VER_MAJORMAJOR          1
 #define VER_MAJOR               27
-#define VER_MINOR               06
+#define VER_MINOR               07
 #define VER_MINORMINOR          00
 
 //Version string. For example "1.17.02.28"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libopenmpt-0.3.7+release.autotools/configure 
new/libopenmpt-0.3.8+release.autotools/configure
--- old/libopenmpt-0.3.7+release.autotools/configure    2018-03-11 
14:03:46.000000000 +0100
+++ new/libopenmpt-0.3.8+release.autotools/configure    2018-04-08 
13:43:11.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.3.7+release.autotools.
+# Generated by GNU Autoconf 2.69 for libopenmpt 0.3.8+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.3.7+release.autotools'
-PACKAGE_STRING='libopenmpt 0.3.7+release.autotools'
+PACKAGE_VERSION='0.3.8+release.autotools'
+PACKAGE_STRING='libopenmpt 0.3.8+release.autotools'
 PACKAGE_BUGREPORT='https://bugs.openmpt.org/'
 PACKAGE_URL='https://lib.openmpt.org/'
 
@@ -1482,7 +1482,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.3.7+release.autotools to adapt to many 
kinds of systems.
+\`configure' configures libopenmpt 0.3.8+release.autotools to adapt to many 
kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1553,7 +1553,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libopenmpt 
0.3.7+release.autotools:";;
+     short | recursive ) echo "Configuration of libopenmpt 
0.3.8+release.autotools:";;
    esac
   cat <<\_ACEOF
 
@@ -1752,7 +1752,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libopenmpt configure 0.3.7+release.autotools
+libopenmpt configure 0.3.8+release.autotools
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2151,7 +2151,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.3.7+release.autotools, which was
+It was created by libopenmpt $as_me 0.3.8+release.autotools, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3022,7 +3022,7 @@
 
 # Define the identity of the package.
  PACKAGE='libopenmpt'
- VERSION='0.3.7+release.autotools'
+ VERSION='0.3.8+release.autotools'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -17186,13 +17186,13 @@
 
 
 
-$as_echo "#define MPT_SVNURL 
\"https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.3.7\""; >>confdefs.h
+$as_echo "#define MPT_SVNURL 
\"https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.3.8\""; >>confdefs.h
 
 
-$as_echo "#define MPT_SVNVERSION \"9916\"" >>confdefs.h
+$as_echo "#define MPT_SVNVERSION \"10047\"" >>confdefs.h
 
 
-$as_echo "#define MPT_SVNDATE \"2018-03-11T12:57:21.839898Z\"" >>confdefs.h
+$as_echo "#define MPT_SVNDATE \"2018-04-08T11:38:47.886627Z\"" >>confdefs.h
 
 
 $as_echo "#define MPT_PACKAGE true" >>confdefs.h
@@ -22366,7 +22366,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.3.7+release.autotools, which was
+This file was extended by libopenmpt $as_me 0.3.8+release.autotools, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -22433,7 +22433,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.3.7+release.autotools
+libopenmpt config.status 0.3.8+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.3.7+release.autotools/configure.ac 
new/libopenmpt-0.3.8+release.autotools/configure.ac
--- old/libopenmpt-0.3.7+release.autotools/configure.ac 2018-03-11 
14:03:36.000000000 +0100
+++ new/libopenmpt-0.3.8+release.autotools/configure.ac 2018-04-08 
13:43:01.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT([libopenmpt], [0.3.7+release.autotools], [https://bugs.openmpt.org/], 
[libopenmpt], [https://lib.openmpt.org/])
+AC_INIT([libopenmpt], [0.3.8+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.3.7";], [svn version])
-AC_DEFINE([MPT_SVNVERSION], ["9916"], [svn version])
-AC_DEFINE([MPT_SVNDATE], ["2018-03-11T12:57:21.839898Z"], [svn date])
+AC_DEFINE([MPT_SVNURL], 
["https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.3.8";], [svn version])
+AC_DEFINE([MPT_SVNVERSION], ["10047"], [svn version])
+AC_DEFINE([MPT_SVNDATE], ["2018-04-08T11:38:47.886627Z"], [svn date])
 AC_DEFINE([MPT_PACKAGE], [true], [is package])
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.3.7+release.autotools/libopenmpt/dox/changelog.md 
new/libopenmpt-0.3.8+release.autotools/libopenmpt/dox/changelog.md
--- old/libopenmpt-0.3.7+release.autotools/libopenmpt/dox/changelog.md  
2018-03-11 13:56:46.000000000 +0100
+++ new/libopenmpt-0.3.8+release.autotools/libopenmpt/dox/changelog.md  
2018-04-08 13:38:01.000000000 +0200
@@ -5,6 +5,18 @@
 For fully detailed change log, please see the source repository directly. This
 is just a high-level summary.
 
+### libopenmpt 0.3.8 (2018-04-08)
+
+ *  [**Sec**] Possible out-of-bounds memory read with IT / ITP / MO3 files
+    containing pattern loops (r10028).
+
+ *  Keep track of active SFx macro during seeking.
+ *  The "note cut" duplicate note action did not volume-ramp the previously
+    playing sample.
+ *  A song starting with non-existing patterns could not be played.
+ *  DSM: Support restart position and 16-bit samples.
+ *  DTM: Import global volume.
+
 ### libopenmpt 0.3.7 (2018-03-11)
 
  *  [**Bug**] libopenmpt did not build with NDK r13b on armeabi due to missing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.3.7+release.autotools/libopenmpt/libopenmpt_version.h 
new/libopenmpt-0.3.8+release.autotools/libopenmpt/libopenmpt_version.h
--- old/libopenmpt-0.3.7+release.autotools/libopenmpt/libopenmpt_version.h      
2018-03-11 13:56:46.000000000 +0100
+++ new/libopenmpt-0.3.8+release.autotools/libopenmpt/libopenmpt_version.h      
2018-04-08 13:38:01.000000000 +0200
@@ -19,7 +19,7 @@
 /*! \brief libopenmpt minor version number */
 #define OPENMPT_API_VERSION_MINOR 3
 /*! \brief libopenmpt patch version number */
-#define OPENMPT_API_VERSION_PATCH 7
+#define OPENMPT_API_VERSION_PATCH 8
 /*! \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.3.7+release.autotools/libopenmpt/libopenmpt_version.mk 
new/libopenmpt-0.3.8+release.autotools/libopenmpt/libopenmpt_version.mk
--- old/libopenmpt-0.3.7+release.autotools/libopenmpt/libopenmpt_version.mk     
2018-03-11 13:56:46.000000000 +0100
+++ new/libopenmpt-0.3.8+release.autotools/libopenmpt/libopenmpt_version.mk     
2018-04-08 13:38:01.000000000 +0200
@@ -1,8 +1,8 @@
 LIBOPENMPT_VERSION_MAJOR=0
 LIBOPENMPT_VERSION_MINOR=3
-LIBOPENMPT_VERSION_PATCH=7
+LIBOPENMPT_VERSION_PATCH=8
 LIBOPENMPT_VERSION_PREREL=
 
 LIBOPENMPT_LTVER_CURRENT=1
-LIBOPENMPT_LTVER_REVISION=7
+LIBOPENMPT_LTVER_REVISION=8
 LIBOPENMPT_LTVER_AGE=1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libopenmpt-0.3.7+release.autotools/man/openmpt123.1 
new/libopenmpt-0.3.8+release.autotools/man/openmpt123.1
--- old/libopenmpt-0.3.7+release.autotools/man/openmpt123.1     2018-03-11 
14:03:36.000000000 +0100
+++ new/libopenmpt-0.3.8+release.autotools/man/openmpt123.1     2018-04-08 
13:43:01.000000000 +0200
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.4.
-.TH OPENMPT123 "1" "March 2018" "openmpt123 v0.3.7" "User Commands"
+.TH OPENMPT123 "1" "April 2018" "openmpt123 v0.3.8" "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.3.7+release.autotools/soundlib/Dlsbank.cpp 
new/libopenmpt-0.3.8+release.autotools/soundlib/Dlsbank.cpp
--- old/libopenmpt-0.3.7+release.autotools/soundlib/Dlsbank.cpp 2018-03-09 
22:13:44.000000000 +0100
+++ new/libopenmpt-0.3.8+release.autotools/soundlib/Dlsbank.cpp 2018-03-26 
01:56:16.000000000 +0200
@@ -446,7 +446,7 @@
        if(sustain >= 0)
        {
                int32 l = sustain / (1000 * 512);
-               if(l >= 0 || l <= 128)
+               if(l >= 0 && l <= 128)
                        return static_cast<uint8>(l);
        }
        return 128;
@@ -1932,6 +1932,7 @@
                        pIns->VolEnv[3] = EnvelopeNode(pIns->VolEnv[2].tick * 
2u, ENVELOPE_MIN);        // 1 second max. for drums
                }
        }
+       pIns->Convert(MOD_TYPE_MPT, sndFile.GetType());
        return true;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.3.7+release.autotools/soundlib/Load_dbm.cpp 
new/libopenmpt-0.3.8+release.autotools/soundlib/Load_dbm.cpp
--- old/libopenmpt-0.3.7+release.autotools/soundlib/Load_dbm.cpp        
2018-02-24 20:32:20.000000000 +0100
+++ new/libopenmpt-0.3.8+release.autotools/soundlib/Load_dbm.cpp        
2018-03-20 17:40:49.000000000 +0100
@@ -494,7 +494,7 @@
                                        continue;
                                }
 
-                               ModCommand dummy;
+                               ModCommand dummy = ModCommand::Empty();
                                ModCommand &m = ch <= GetNumChannels() ? 
patRow[ch - 1] : dummy;
 
                                const uint8 b = chunk.ReadUint8();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.3.7+release.autotools/soundlib/Load_dsm.cpp 
new/libopenmpt-0.3.8+release.autotools/soundlib/Load_dsm.cpp
--- old/libopenmpt-0.3.7+release.autotools/soundlib/Load_dsm.cpp        
2017-09-24 09:24:38.000000000 +0200
+++ new/libopenmpt-0.3.8+release.autotools/soundlib/Load_dsm.cpp        
2018-03-26 01:54:40.000000000 +0200
@@ -6,11 +6,13 @@
  *          MilkyTracker can load it, but the only files of this format seen 
in the wild are also
  *          available in their original format, so I did not bother 
implementing it so far.
  *
- *          2. Using PLAY.EXE v1.02, commands not supported in MOD do not seem 
to do anything at all.
+ *          2. Using both PLAY.EXE v1.02 and v2.00, commands not supported in 
MOD do not seem to do
+ *          anything at all.
  *          In particular commands 0x11-0x13 handled below are ignored, and no 
files have been spotted
  *          in the wild using any commands > 0x0F at all.
  *          S3M-style retrigger does not seem to exist - it is translated to 
volume slides by CONV.EXE,
- *          and J00 in S3M files is not converted either.
+ *          and J00 in S3M files is not converted either. S3M pattern loops 
(SBx) are not converted
+ *          properly by CONV.EXE and completely ignored by PLAY.EXE.
  *          Command 8 (set panning) uses 00-80 for regular panning and A4 for 
surround, probably
  *          making DSIK one of the first applications to use this particular 
encoding scheme still
  *          used in "extended" S3Ms today.
@@ -36,9 +38,10 @@
 struct DSMSongHeader
 {
        char     songName[28];
-       char     reserved1[2];
+       uint16le fileVersion;
        uint16le flags;
-       char     reserved2[4];
+       uint16le orderPos;
+       uint16le restartPos;
        uint16le numOrders;
        uint16le numSamples;
        uint16le numPatterns;
@@ -57,13 +60,12 @@
 struct DSMSampleHeader
 {
        char     filename[13];
-       uint8le  flags;
-       char     reserved1;
+       uint16le flags;
        uint8le  volume;
        uint32le length;
        uint32le loopStart;
        uint32le loopEnd;
-       char     reserved2[4];
+       uint32le dataPtr;       // Interal sample pointer during playback in 
DSIK
        uint32le sampleRate;
        char     sampleName[28];
 
@@ -93,6 +95,8 @@
                        sampleIO |= SampleIO::deltaPCM; // fairlight.dsm by 
Comrade J
                else if(flags & 0x02)
                        sampleIO |= SampleIO::signedPCM;
+               if(flags & 0x04)
+                       sampleIO |= SampleIO::_16bit;
                return sampleIO;
        }
 };
@@ -197,10 +201,14 @@
 
        DSMSongHeader songHeader;
        file.ReadStructPartial(songHeader, chunkHeader.size);
+       if(songHeader.numOrders > 128 || songHeader.numChannels > 16 || 
songHeader.numPatterns > 256 || songHeader.restartPos > 128)
+       {
+               return false;
+       }
 
        InitializeGlobals(MOD_TYPE_DSM);
        mpt::String::Read<mpt::String::maybeNullTerminated>(m_songName, 
songHeader.songName);
-       m_nChannels = Clamp<uint16, uint16>(songHeader.numChannels, 1, 16);
+       m_nChannels = std::max<uint16>(songHeader.numChannels, 1);
        m_nDefaultSpeed = songHeader.speed;
        m_nDefaultTempo.Set(songHeader.bpm);
        m_nDefaultGlobalVolume = std::min<uint8>(songHeader.globalVol, 64) * 4u;
@@ -224,6 +232,8 @@
        }
 
        ReadOrderFromArray(Order(), songHeader.orders, songHeader.numOrders, 
0xFF, 0xFE);
+       if(songHeader.restartPos < songHeader.numOrders)
+               Order().SetRestartPos(songHeader.restartPos);
 
        // Read pattern and sample chunks
        PATTERNINDEX patNum = 0;
@@ -240,6 +250,7 @@
                        }
                        chunk.Skip(2);
 
+                       ModCommand dummy = ModCommand::Empty();
                        ROWINDEX row = 0;
                        PatternRow rowBase = Patterns[patNum].GetRow(0);
                        while(chunk.CanRead(1) && row < 64)
@@ -253,7 +264,6 @@
                                }
 
                                CHANNELINDEX chn = (flag & 0x0F);
-                               ModCommand dummy = ModCommand();
                                ModCommand &m = (chn < GetNumChannels() ? 
rowBase[chn] : dummy);
 
                                if(flag & 0x80)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.3.7+release.autotools/soundlib/Load_dtm.cpp 
new/libopenmpt-0.3.8+release.autotools/soundlib/Load_dtm.cpp
--- old/libopenmpt-0.3.7+release.autotools/soundlib/Load_dtm.cpp        
2017-10-03 12:17:12.000000000 +0200
+++ new/libopenmpt-0.3.8+release.autotools/soundlib/Load_dtm.cpp        
2018-03-26 01:54:40.000000000 +0200
@@ -102,6 +102,7 @@
                if(formatVersion == DTM_206_PATTERN_FORMAT && transpose > 0 && 
transpose != 48)
                {
                        // Digital Home Studio applies this unconditionally, 
but some old songs sound wrong then (delirium.dtm).
+                       // Digital Tracker 2.03 ignores the setting.
                        // Maybe this should not be applied for "real" Digital 
Tracker modules?
                        transposeAmount += (48 - transpose) * 128;
                }
@@ -292,7 +293,13 @@
                        ChnSettings[chn].nPan = static_cast<uint16>(128 + 
Util::muldivr(std::min<int>(panning[chn], 180) - 90, 128, 90));
                }
 
-               chunk.Skip(146);
+               chunk.Skip(16);
+               // Chunk ends here for old DTM modules
+               if(chunk.CanRead(2))
+               {
+                       m_nDefaultGlobalVolume = 
std::min<uint32>(chunk.ReadUint16BE(), MAX_GLOBAL_VOLUME);
+               }
+               chunk.Skip(128);
                uint16be volume[32];
                if(chunk.ReadArray(volume))
                {
@@ -356,9 +363,10 @@
                                chunk.ReadStruct(instr);
                                if(instr.insNum < GetNumInstruments())
                                {
-                                       Samples[instr.insNum + 1].nVibDepth = 
instr.vibDepth;
-                                       Samples[instr.insNum + 1].nVibRate = 
instr.vibRate;
-                                       Samples[instr.insNum + 1].nVibSweep = 
255;
+                                       ModSample &sample = 
Samples[instr.insNum + 1];
+                                       sample.nVibDepth = instr.vibDepth;
+                                       sample.nVibRate = instr.vibRate;
+                                       sample.nVibSweep = 255;
 
                                        ModInstrument *mptIns = 
AllocateInstrument(instr.insNum + 1, instr.insNum + 1);
                                        if(mptIns != nullptr)
@@ -463,6 +471,8 @@
 #ifdef MODPLUG_TRACKER
                                                m->Convert(MOD_TYPE_MOD, 
MOD_TYPE_IT, *this);
 #endif
+                                               // G is 8-bit volume
+                                               // P is tremor (need to disable 
oldfx)
                                        }
                                        if(data[5] & 0x80)
                                                tick += (data[5] & 0x7F) * 
0x100 + rowChunk.ReadUint8();
@@ -562,12 +572,12 @@
        // Read sample data
        for(auto &chunk : chunks.GetAllChunks(DTMChunk::idDAIT))
        {
-               PATTERNINDEX smp = chunk.ReadUint16BE() + 1;
-               if(smp == 0 || smp > GetNumSamples() || !(loadFlags & 
loadSampleData))
+               SAMPLEINDEX smp = chunk.ReadUint16BE();
+               if(smp >= GetNumSamples() || !(loadFlags & loadSampleData))
                {
                        continue;
                }
-               ModSample &mptSmp = Samples[smp];
+               ModSample &mptSmp = Samples[smp + 1];
                SampleIO(
                        mptSmp.uFlags[CHN_16BIT] ? SampleIO::_16bit : 
SampleIO::_8bit,
                        mptSmp.uFlags[CHN_STEREO] ? 
SampleIO::stereoInterleaved: SampleIO::mono,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.3.7+release.autotools/soundlib/Load_it.cpp 
new/libopenmpt-0.3.8+release.autotools/soundlib/Load_it.cpp
--- old/libopenmpt-0.3.7+release.autotools/soundlib/Load_it.cpp 2018-02-10 
14:26:25.000000000 +0100
+++ new/libopenmpt-0.3.8+release.autotools/soundlib/Load_it.cpp 2018-03-20 
17:41:29.000000000 +0100
@@ -1039,7 +1039,7 @@
                        }
 
                        // Now we grab the data for this particular row/channel.
-                       ModCommand dummy;
+                       ModCommand dummy = ModCommand::Empty();
                        ModCommand &m = ch < m_nChannels ? patData[ch] : dummy;
 
                        if(chnMask[ch] & 0x10)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.3.7+release.autotools/soundlib/Load_mod.cpp 
new/libopenmpt-0.3.8+release.autotools/soundlib/Load_mod.cpp
--- old/libopenmpt-0.3.7+release.autotools/soundlib/Load_mod.cpp        
2018-01-12 23:23:29.000000000 +0100
+++ new/libopenmpt-0.3.8+release.autotools/soundlib/Load_mod.cpp        
2018-03-20 17:40:09.000000000 +0100
@@ -2133,7 +2133,7 @@
                        && IsInRange(info.dateMinute, 0, 59) && 
IsInRange(info.dateSecond, 0, 59))
                {
                        FileHistory mptHistory;
-                       MemsetZero(mptHistory.loadDate);
+                       MemsetZero(mptHistory);
                        mptHistory.loadDate.tm_year = info.dateYear;
                        mptHistory.loadDate.tm_mon = info.dateMonth - 1;
                        mptHistory.loadDate.tm_mday = info.dateDay;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.3.7+release.autotools/soundlib/Load_s3m.cpp 
new/libopenmpt-0.3.8+release.autotools/soundlib/Load_s3m.cpp
--- old/libopenmpt-0.3.7+release.autotools/soundlib/Load_s3m.cpp        
2017-09-24 09:24:38.000000000 +0200
+++ new/libopenmpt-0.3.8+release.autotools/soundlib/Load_s3m.cpp        
2018-03-20 17:42:08.000000000 +0100
@@ -492,7 +492,7 @@
                        }
 
                        CHANNELINDEX channel = (info & s3mChannelMask);
-                       ModCommand dummy;
+                       ModCommand dummy = ModCommand::Empty();
                        ModCommand &m = (channel < GetNumChannels()) ? 
rowBase[channel] : dummy;
 
                        if(info & s3mNotePresent)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.3.7+release.autotools/soundlib/MixerLoops.cpp 
new/libopenmpt-0.3.8+release.autotools/soundlib/MixerLoops.cpp
--- old/libopenmpt-0.3.7+release.autotools/soundlib/MixerLoops.cpp      
2017-09-24 09:24:38.000000000 +0200
+++ new/libopenmpt-0.3.8+release.autotools/soundlib/MixerLoops.cpp      
2018-03-20 17:39:13.000000000 +0100
@@ -720,9 +720,14 @@
        {
 #ifdef MPT_INTMIXER
                // Equivalent to int x_r = (rofs + (rofs > 0 ? 255 : -255)) / 
256;
+#if MPT_COMPILER_SHIFT_SIGNED
                const mixsample_t x_r = (rofs + (((-rofs) >> 
(sizeof(mixsample_t) * 8 - 1)) & OFSDECAYMASK)) >> OFSDECAYSHIFT;
                const mixsample_t x_l = (lofs + (((-lofs) >> 
(sizeof(mixsample_t) * 8 - 1)) & OFSDECAYMASK)) >> OFSDECAYSHIFT;
 #else
+               const mixsample_t x_r = mpt::rshift_signed(rofs + 
(mpt::rshift_signed(-rofs, sizeof(int) * 8 - 1) & OFSDECAYMASK), OFSDECAYSHIFT);
+               const mixsample_t x_l = mpt::rshift_signed(lofs + 
(mpt::rshift_signed(-lofs, sizeof(int) * 8 - 1) & OFSDECAYMASK), OFSDECAYSHIFT);
+#endif
+#else
                const mixsample_t x_r = rofs * (1.0f / (1 << OFSDECAYSHIFT));
                const mixsample_t x_l = lofs * (1.0f / (1 << OFSDECAYSHIFT));
 #endif
@@ -803,9 +808,14 @@
        for (uint32 i=0; i<nSamples; i++)
        {
 #ifdef MPT_INTMIXER
+#if MPT_COMPILER_SHIFT_SIGNED
                const mixsample_t x_r = (rofs + (((-rofs) >> 
(sizeof(mixsample_t) * 8 - 1)) & OFSDECAYMASK)) >> OFSDECAYSHIFT;
                const mixsample_t x_l = (lofs + (((-lofs) >> 
(sizeof(mixsample_t) * 8 - 1)) & OFSDECAYMASK)) >> OFSDECAYSHIFT;
 #else
+               const mixsample_t x_r = mpt::rshift_signed(rofs + 
(mpt::rshift_signed(-rofs, sizeof(int) * 8 - 1) & OFSDECAYMASK), OFSDECAYSHIFT);
+               const mixsample_t x_l = mpt::rshift_signed(lofs + 
(mpt::rshift_signed(-lofs, sizeof(int) * 8 - 1) & OFSDECAYMASK), OFSDECAYSHIFT);
+#endif
+#else
                const mixsample_t x_r = rofs * (1.0f / (1 << OFSDECAYSHIFT));
                const mixsample_t x_l = lofs * (1.0f / (1 << OFSDECAYSHIFT));
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.3.7+release.autotools/soundlib/Snd_fx.cpp 
new/libopenmpt-0.3.8+release.autotools/soundlib/Snd_fx.cpp
--- old/libopenmpt-0.3.7+release.autotools/soundlib/Snd_fx.cpp  2018-03-08 
21:19:42.000000000 +0100
+++ new/libopenmpt-0.3.8+release.autotools/soundlib/Snd_fx.cpp  2018-04-07 
18:05:43.000000000 +0200
@@ -320,9 +320,9 @@
                bool patternBreakOnThisRow = false;
                bool patternLoopEndedOnThisRow = false, 
patternLoopStartedOnThisRow = false;
 
-               if(playState.m_nPattern == orderList.GetIgnoreIndex() && 
target.mode == GetLengthTarget::SeekPosition && playState.m_nCurrentOrder == 
target.pos.order)
+               if(!Patterns.IsValidPat(playState.m_nPattern) && 
playState.m_nPattern != orderList.GetInvalidPatIndex() && target.mode == 
GetLengthTarget::SeekPosition && playState.m_nCurrentOrder == target.pos.order)
                {
-                       // Early test: Target is inside +++ pattern
+                       // Early test: Target is inside +++ or non-existing 
pattern
                        retval.targetReached = true;
                        break;
                }
@@ -485,7 +485,7 @@
                                {
                                        // Fine Pattern Delay
                                        tickDelay += (p->param & 0x0F);
-                               } if((p->param & 0xF0) == 0xE0 && !rowDelay)
+                               } else if((p->param & 0xF0) == 0xE0 && 
!rowDelay)
                                {
                                        // Pattern Delay
                                        if(!(GetType() & MOD_TYPE_S3M) || 
(p->param & 0x0F) != 0)
@@ -665,12 +665,18 @@
                                                patternLoopStartedOnThisRow = 
true;
                                        }
                                        break;
+
+                               case 0xF0:
+                                       // Active macro
+                                       pChn->nActiveMacro = param & 0x0F;
+                                       break;
                                }
                                break;
 
                        case CMD_MODCMDEX:
-                               if ((param & 0xF0) == 0x60)
+                               switch(param & 0xF0)
                                {
+                               case 0x60:
                                        // Pattern Loop
                                        if (param & 0x0F)
                                        {
@@ -683,6 +689,12 @@
                                                
memory.chnSettings[nChn].patLoopSmp = playState.m_lTotalSampleCount;
                                                
memory.chnSettings[nChn].patLoopStart = playState.m_nRow;
                                        }
+                                       break;
+
+                               case 0xF0:
+                                       // Active macro
+                                       pChn->nActiveMacro = param & 0x0F;
+                                       break;
                                }
                                break;
 
@@ -1162,7 +1174,8 @@
                        if(GetType() == MOD_TYPE_IT)
                        {
                                // IT pattern loop start row update - at the 
end of a pattern loop, set pattern loop start to next row (for upcoming pattern 
loops with missing SB0)
-                               for(CHANNELINDEX nChn = 0; nChn < 
GetNumChannels(); nChn++)
+                               pChn = playState.Chn;
+                               for(CHANNELINDEX nChn = 0; nChn < 
GetNumChannels(); nChn++, pChn++)
                                {
                                        if((pChn->rowCommand.command == 
CMD_S3MCMDEX && pChn->rowCommand.param >= 0xB1 && pChn->rowCommand.param <= 
0xBF))
                                        {
@@ -2079,13 +2092,11 @@
        if (srcChn.dwFlags[CHN_MUTE])
                return CHANNELINDEX_INVALID;
 
-       bool applyDNAtoPlug;    //rewbs.VSTiNNA
-
        for(CHANNELINDEX i = nChn; i < MAX_CHANNELS; i++)
        if(i >= m_nChannels || i == nChn)
        {
                ModChannel &chn = m_PlayState.Chn[i];
-               applyDNAtoPlug = false; //rewbs.VSTiNNA
+               bool applyDNAtoPlug = false;
                if((chn.nMasterChn == nChn + 1 || i == nChn) && 
chn.pModInstrument != nullptr)
                {
                        bool bOk = false;
@@ -2095,7 +2106,7 @@
                        // Note
                        case DCT_NOTE:
                                if(note && chn.nNote == note && pIns == 
chn.pModInstrument) bOk = true;
-                               if(pIns && pIns->nMixPlug) applyDNAtoPlug = 
true; //rewbs.VSTiNNA
+                               if(pIns && pIns->nMixPlug) applyDNAtoPlug = 
true;
                                break;
                        // Sample
                        case DCT_SAMPLE:
@@ -2104,7 +2115,6 @@
                        // Instrument
                        case DCT_INSTRUMENT:
                                if(pIns == chn.pModInstrument) bOk = true;
-                               //rewbs.VSTiNNA
                                if(pIns && pIns->nMixPlug) applyDNAtoPlug = 
true;
                                break;
                        // Plugin
@@ -2114,7 +2124,6 @@
                                        applyDNAtoPlug = true;
                                        bOk = true;
                                }
-                               //end rewbs.VSTiNNA
                                break;
 
                        }
@@ -2175,7 +2184,7 @@
                        pPlugin =  m_MixPlugins[nPlugin-1].pMixPlugin;
                        if(pPlugin)
                        {
-                               // apply NNA to this plugin iff it is currently 
playing a note on this tracking channel
+                               // apply NNA to this plugin iff it is currently 
playing a note on this tracker channel
                                // (and if it is playing a note, we know that 
would be the last note played on this chan).
                                applyNNAtoPlug = 
pPlugin->IsNotePlaying(srcChn.GetPluginNote(m_playBehaviour[kITRealNoteMapping]),
 GetBestMidiChannel(nChn), nChn);
                        }
@@ -2184,8 +2193,7 @@
 #endif // NO_PLUGINS
 
        // New Note Action
-       //if ((pChn.nVolume) && (pChn.nLength))
-       if((srcChn.nVolume != 0 && srcChn.nLength != 0) || applyNNAtoPlug) 
//rewbs.VSTiNNA
+       if((srcChn.nRealVolume > 0 && srcChn.nLength > 0) || applyNNAtoPlug)
        {
                nnaChn = GetNNAChannel(nChn);
                if(nnaChn != 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.3.7+release.autotools/soundlib/Sndfile.cpp 
new/libopenmpt-0.3.8+release.autotools/soundlib/Sndfile.cpp
--- old/libopenmpt-0.3.7+release.autotools/soundlib/Sndfile.cpp 2017-10-27 
20:50:27.000000000 +0200
+++ new/libopenmpt-0.3.8+release.autotools/soundlib/Sndfile.cpp 2018-04-07 
17:42:05.000000000 +0200
@@ -320,7 +320,7 @@
                if((result == ProbeWantMoreData) && (data.size() >= 
ProbeRecommendedSize))
                {
                        // If the prober wants more daat but we already 
provided the recommended required maximum,
-                       // just return success as this is th ebest we can do 
for the suggestesd probing size.
+                       // just return success as this is the best we can do 
for the suggestesd probing size.
                        result = ProbeSuccess;
                }
        }
@@ -654,7 +654,7 @@
                if (Reporting::Confirm(mpt::ToWide(mpt::CharsetUTF8, 
notFoundText.c_str()), L"OpenMPT - Plugins missing", false, true) == cnfYes)
                {
                        std::string url = 
"https://resources.openmpt.org/plugins/search.php?p=";;
-                       for(auto &id : notFoundIDs)
+                       for(const auto &id : notFoundIDs)
                        {
                                url += mpt::fmt::HEX0<8>(id->dwPluginId2.get());
                                url += id->szLibraryName;
@@ -810,8 +810,11 @@
 
 void CSoundFile::SetCurrentOrder(ORDERINDEX nOrder)
 {
-       while ((nOrder < Order().size()) && (Order()[nOrder] == 
Order.GetIgnoreIndex())) nOrder++;
-       if ((nOrder >= Order().size()) || (Order()[nOrder] >= Patterns.Size())) 
return;
+       while(nOrder < Order().size() && !Order().IsValidPat(nOrder))
+               nOrder++;
+       if(nOrder >= Order().size())
+               return;
+
        for(auto &chn : m_PlayState.Chn)
        {
                chn.nPeriod = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.3.7+release.autotools/soundlib/plugins/PlugInterface.cpp 
new/libopenmpt-0.3.8+release.autotools/soundlib/plugins/PlugInterface.cpp
--- old/libopenmpt-0.3.7+release.autotools/soundlib/plugins/PlugInterface.cpp   
2017-11-04 13:21:09.000000000 +0100
+++ new/libopenmpt-0.3.8+release.autotools/soundlib/plugins/PlugInterface.cpp   
2018-04-05 22:43:47.000000000 +0200
@@ -651,7 +651,7 @@
                defaultDir = m_Factory.dllPath.GetPath();
        }
 
-       CString progName = GetCurrentProgramName();
+       CString progName = m_Factory.libraryName.ToCString() + _T(" - ") + 
GetCurrentProgramName();
        SanitizeFilename(progName);
 
        FileDialog dlg = SaveFileDialog()
@@ -928,7 +928,7 @@
                // Problem: if a note dies out naturally and we never send a 
note off, this counter
                // will block at max until note off. Is this a problem?
                // Safe to assume we won't need more than 16 note offs max on a 
given note?
-               if(channel.noteOnMap[note][trackChannel] < 17)
+               if(channel.noteOnMap[note][trackChannel] < uint8_max)
                        channel.noteOnMap[note][trackChannel]++;
 
                MidiSend(MIDIEvents::NoteOn(nMidiCh, static_cast<uint8>(note), 
volume));


Reply via email to