Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libopenmpt for openSUSE:Factory 
checked in at 2023-04-20 15:13:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libopenmpt (Old)
 and      /work/SRC/openSUSE:Factory/.libopenmpt.new.2023 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libopenmpt"

Thu Apr 20 15:13:41 2023 rev:42 rq:1080266 version:0.6.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/libopenmpt/libopenmpt.changes    2023-03-30 
22:50:41.516390138 +0200
+++ /work/SRC/openSUSE:Factory/.libopenmpt.new.2023/libopenmpt.changes  
2023-04-20 15:14:15.625898187 +0200
@@ -1,0 +2,17 @@
+Tue Apr 18 18:50:53 UTC 2023 - Antonio Teixeira <antonio.teixe...@suse.com>
+
+- Update to 0.6.10
+  * [Bug] File probing and loading results could be inconsistent
+    for SFX files, so that probing could claim that a file is
+    definitely not playable even if it would be.
+  * MOD: VBlank heuristics are now applied to MOD files with M!K!
+    signature. Fixes mod.siedler ii.
+  * NoiseTracker MODs are now always played with VBlank timing.
+  * MED: Add support for default instrument pitch.
+  * MED: Global play transpose value was not considered for MMD0
+    files.
+  * 669: Reject files with lots of control characters in song
+    message.
+  * mpg123: Update to v1.31.3 (2023-03-19).
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ libopenmpt.spec ++++++
--- /var/tmp/diff_new_pack.qjFltO/_old  2023-04-20 15:14:18.409910951 +0200
+++ /var/tmp/diff_new_pack.qjFltO/_new  2023-04-20 15:14:18.417910988 +0200
@@ -21,7 +21,7 @@
 %define libopenmpt_modplug_version 0.8.9.0
 
 Name:           libopenmpt
-Version:        0.6.9
+Version:        0.6.10
 Release:        0
 Summary:        C++ and C library to decode tracker music files
 License:        BSD-3-Clause

++++++ libopenmpt-0.6.9+release.autotools.tar.gz -> 
libopenmpt-0.6.10+release.autotools.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.6.9+release.autotools/common/versionNumber.h 
new/libopenmpt-0.6.10+release.autotools/common/versionNumber.h
--- old/libopenmpt-0.6.9+release.autotools/common/versionNumber.h       
2023-03-05 13:24:48.000000000 +0100
+++ new/libopenmpt-0.6.10+release.autotools/common/versionNumber.h      
2023-04-15 14:47:36.000000000 +0200
@@ -17,7 +17,7 @@
 // Version definitions. The only thing that needs to be changed when changing 
version number.
 #define VER_MAJORMAJOR  1
 #define VER_MAJOR      30
-#define VER_MINOR      11
+#define VER_MINOR      12
 #define VER_MINORMINOR 00
 
 OPENMPT_NAMESPACE_END
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libopenmpt-0.6.9+release.autotools/configure 
new/libopenmpt-0.6.10+release.autotools/configure
--- old/libopenmpt-0.6.9+release.autotools/configure    2023-03-05 
13:49:28.000000000 +0100
+++ new/libopenmpt-0.6.10+release.autotools/configure   2023-04-15 
15:34:10.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.6.9+release.autotools.
+# Generated by GNU Autoconf 2.69 for libopenmpt 0.6.10+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.6.9+release.autotools'
-PACKAGE_STRING='libopenmpt 0.6.9+release.autotools'
+PACKAGE_VERSION='0.6.10+release.autotools'
+PACKAGE_STRING='libopenmpt 0.6.10+release.autotools'
 PACKAGE_BUGREPORT='https://bugs.openmpt.org/'
 PACKAGE_URL='https://lib.openmpt.org/'
 
@@ -1475,7 +1475,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.6.9+release.autotools to adapt to many 
kinds of systems.
+\`configure' configures libopenmpt 0.6.10+release.autotools to adapt to many 
kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1546,7 +1546,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libopenmpt 
0.6.9+release.autotools:";;
+     short | recursive ) echo "Configuration of libopenmpt 
0.6.10+release.autotools:";;
    esac
   cat <<\_ACEOF
 
@@ -1732,7 +1732,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libopenmpt configure 0.6.9+release.autotools
+libopenmpt configure 0.6.10+release.autotools
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2222,7 +2222,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.6.9+release.autotools, which was
+It was created by libopenmpt $as_me 0.6.10+release.autotools, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3086,7 +3086,7 @@
 
 # Define the identity of the package.
  PACKAGE='libopenmpt'
- VERSION='0.6.9+release.autotools'
+ VERSION='0.6.10+release.autotools'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -17253,13 +17253,13 @@
 
 
 
-$as_echo "#define MPT_SVNURL 
\"https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.6.9\""; >>confdefs.h
+$as_echo "#define MPT_SVNURL 
\"https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.6.10\""; >>confdefs.h
 
 
-$as_echo "#define MPT_SVNVERSION \"18817\"" >>confdefs.h
+$as_echo "#define MPT_SVNVERSION \"19034\"" >>confdefs.h
 
 
-$as_echo "#define MPT_SVNDATE \"2023-03-05T12:41:15.297347Z\"" >>confdefs.h
+$as_echo "#define MPT_SVNDATE \"2023-04-15T12:59:43.029070Z\"" >>confdefs.h
 
 
 $as_echo "#define MPT_PACKAGE true" >>confdefs.h
@@ -22545,7 +22545,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.6.9+release.autotools, which was
+This file was extended by libopenmpt $as_me 0.6.10+release.autotools, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -22603,7 +22603,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.6.9+release.autotools
+libopenmpt config.status 0.6.10+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.6.9+release.autotools/configure.ac 
new/libopenmpt-0.6.10+release.autotools/configure.ac
--- old/libopenmpt-0.6.9+release.autotools/configure.ac 2023-03-05 
13:49:07.000000000 +0100
+++ new/libopenmpt-0.6.10+release.autotools/configure.ac        2023-04-15 
15:33:47.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT([libopenmpt], [0.6.9+release.autotools], [https://bugs.openmpt.org/], 
[libopenmpt], [https://lib.openmpt.org/])
+AC_INIT([libopenmpt], [0.6.10+release.autotools], [https://bugs.openmpt.org/], 
[libopenmpt], [https://lib.openmpt.org/])
 AC_PREREQ([2.68])
 
 AC_CONFIG_MACRO_DIR([m4])
@@ -26,9 +26,9 @@
 AC_SUBST([LIBOPENMPT_LTVER_REVISION])
 AC_SUBST([LIBOPENMPT_LTVER_AGE])
 
-AC_DEFINE([MPT_SVNURL], 
["https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.6.9";], [svn version])
-AC_DEFINE([MPT_SVNVERSION], ["18817"], [svn version])
-AC_DEFINE([MPT_SVNDATE], ["2023-03-05T12:41:15.297347Z"], [svn date])
+AC_DEFINE([MPT_SVNURL], 
["https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.6.10";], [svn 
version])
+AC_DEFINE([MPT_SVNVERSION], ["19034"], [svn version])
+AC_DEFINE([MPT_SVNDATE], ["2023-04-15T12:59:43.029070Z"], [svn date])
 AC_DEFINE([MPT_PACKAGE], [true], [is package])
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.6.9+release.autotools/libopenmpt/dox/changelog.md 
new/libopenmpt-0.6.10+release.autotools/libopenmpt/dox/changelog.md
--- old/libopenmpt-0.6.9+release.autotools/libopenmpt/dox/changelog.md  
2023-03-05 13:41:12.000000000 +0100
+++ new/libopenmpt-0.6.10+release.autotools/libopenmpt/dox/changelog.md 
2023-04-15 14:59:40.000000000 +0200
@@ -5,6 +5,21 @@
 For fully detailed change log, please see the source repository directly. This
 is just a high-level summary.
 
+### libopenmpt 0.6.10 (2023-04-15)
+
+ *  [**Bug**] File probing and loading results could be inconsistent for SFX
+    files, so that probing could claim that a file is definitely not playable
+    even if it would be.
+
+ *  MOD: VBlank heuristics are now applied to MOD files with M!K! signature.
+    Fixes mod.siedler ii.
+ *  NoiseTracker MODs are now always played with VBlank timing.
+ *  MED: Add support for default instrument pitch.
+ *  MED: Global play transpose value was not considered for MMD0 files.
+ *  669: Reject files with lots of control characters in song message.
+
+ *  mpg123: Update to v1.31.3 (2023-03-19).
+
 ### libopenmpt 0.6.9 (2023-03-05)
 
  *  [**Bug**] An exception could be thrown during rendering when trying to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.6.9+release.autotools/libopenmpt/libopenmpt_version.h 
new/libopenmpt-0.6.10+release.autotools/libopenmpt/libopenmpt_version.h
--- old/libopenmpt-0.6.9+release.autotools/libopenmpt/libopenmpt_version.h      
2023-03-05 13:41:12.000000000 +0100
+++ new/libopenmpt-0.6.10+release.autotools/libopenmpt/libopenmpt_version.h     
2023-04-15 14:59:40.000000000 +0200
@@ -21,7 +21,7 @@
 /*! \brief libopenmpt minor version number */
 #define OPENMPT_API_VERSION_MINOR 6
 /*! \brief libopenmpt patch version number */
-#define OPENMPT_API_VERSION_PATCH 9
+#define OPENMPT_API_VERSION_PATCH 10
 /*! \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.6.9+release.autotools/libopenmpt/libopenmpt_version.mk 
new/libopenmpt-0.6.10+release.autotools/libopenmpt/libopenmpt_version.mk
--- old/libopenmpt-0.6.9+release.autotools/libopenmpt/libopenmpt_version.mk     
2023-03-05 13:41:12.000000000 +0100
+++ new/libopenmpt-0.6.10+release.autotools/libopenmpt/libopenmpt_version.mk    
2023-04-15 14:59:40.000000000 +0200
@@ -1,8 +1,8 @@
 LIBOPENMPT_VERSION_MAJOR=0
 LIBOPENMPT_VERSION_MINOR=6
-LIBOPENMPT_VERSION_PATCH=9
+LIBOPENMPT_VERSION_PATCH=10
 LIBOPENMPT_VERSION_PREREL=
 
 LIBOPENMPT_LTVER_CURRENT=3
-LIBOPENMPT_LTVER_REVISION=9
+LIBOPENMPT_LTVER_REVISION=10
 LIBOPENMPT_LTVER_AGE=3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libopenmpt-0.6.9+release.autotools/man/openmpt123.1 
new/libopenmpt-0.6.10+release.autotools/man/openmpt123.1
--- old/libopenmpt-0.6.9+release.autotools/man/openmpt123.1     2023-03-05 
13:49:06.000000000 +0100
+++ new/libopenmpt-0.6.10+release.autotools/man/openmpt123.1    2023-04-15 
15:33:46.000000000 +0200
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.48.1.
-.TH OPENMPT123 "1" "March 2023" "openmpt123 v0.6.9" "User Commands"
+.TH OPENMPT123 "1" "April 2023" "openmpt123 v0.6.10" "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.6.9+release.autotools/soundlib/ITTools.cpp 
new/libopenmpt-0.6.10+release.autotools/soundlib/ITTools.cpp
--- old/libopenmpt-0.6.9+release.autotools/soundlib/ITTools.cpp 2022-01-30 
15:53:58.000000000 +0100
+++ new/libopenmpt-0.6.10+release.autotools/soundlib/ITTools.cpp        
2023-03-15 21:50:42.000000000 +0100
@@ -511,13 +511,14 @@
                cvt = ITSample::cvtOPLInstrument;
        } else if(mptSmp.uFlags[SMP_KEEPONDISK])
        {
-#ifndef MPT_EXTERNAL_SAMPLES
-               allowExternal = false;
-#endif  // MPT_EXTERNAL_SAMPLES
                // Save external sample (filename at sample pointer)
-               if(allowExternal && mptSmp.HasSampleData())
+               if(mptSmp.HasSampleData())
                {
-                       cvt = ITSample::cvtExternalSample;
+#if !defined(MPT_EXTERNAL_SAMPLES)
+                       allowExternal = false;
+#endif  // MPT_EXTERNAL_SAMPLES
+                       if(allowExternal)
+                               cvt = ITSample::cvtExternalSample;
                } else
                {
                        length = loopbegin = loopend = susloopbegin = 
susloopend = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.6.9+release.autotools/soundlib/Load_669.cpp 
new/libopenmpt-0.6.10+release.autotools/soundlib/Load_669.cpp
--- old/libopenmpt-0.6.9+release.autotools/soundlib/Load_669.cpp        
2021-05-14 02:33:18.000000000 +0200
+++ new/libopenmpt-0.6.10+release.autotools/soundlib/Load_669.cpp       
2023-03-30 22:33:12.000000000 +0200
@@ -1,7 +1,7 @@
 /*
  * Load_669.cpp
  * ------------
- * Purpose: 669 Composer / UNIS 669 module loader
+ * Purpose: Composer 669 / UNIS 669 module loader
  * Notes  : <opinion humble="false">This is better than Schism's 669 
loader</opinion> :)
  *          (some of this code is "heavily inspired" by Storlek's code from 
Schism Tracker, and improvements have been made where necessary.)
  * Authors: Olivier Lapicque
@@ -17,10 +17,10 @@
 
 struct _669FileHeader
 {
-       char  magic[2];                 // 'if' (0x6669, ha ha) or 'JN'
-       char  songMessage[108]; // Song Message
-       uint8 samples;                  // number of samples (1-64)
-       uint8 patterns;                 // number of patterns (1-128)
+       char  magic[2];          // 'if' (0x6669, ha ha) or 'JN'
+       char  songMessage[108];  // Song Message
+       uint8 samples;           // number of samples (1-64)
+       uint8 patterns;          // number of patterns (1-128)
        uint8 restartPos;
        uint8 orders[128];
        uint8 tempoList[128];
@@ -50,8 +50,7 @@
                if(mptSmp.nLoopEnd > mptSmp.nLength && mptSmp.nLoopStart == 0)
                {
                        mptSmp.nLoopEnd = 0;
-               }
-               if(mptSmp.nLoopEnd != 0)
+               } else if(mptSmp.nLoopEnd != 0)
                {
                        mptSmp.uFlags = CHN_LOOP;
                        mptSmp.SanitizeLoops();
@@ -71,6 +70,12 @@
        {
                return false;
        }
+       uint8 invalidCharCount = 0;
+       for(const char c : fileHeader.songMessage)
+       {
+               if(c > 0 && c <= 31 && ++invalidCharCount > 40)
+                       return false;
+       }
        for(std::size_t i = 0; i < std::size(fileHeader.breaks); i++)
        {
                if(fileHeader.orders[i] >= 128 && fileHeader.orders[i] < 0xFE)
@@ -189,14 +194,14 @@
 
                static constexpr ModCommand::COMMAND effTrans[] =
                {
-                       CMD_PORTAMENTOUP,       // Slide up (param * 80) Hz on 
every tick
-                       CMD_PORTAMENTODOWN,     // Slide down (param * 80) Hz 
on every tick
-                       CMD_TONEPORTAMENTO,     // Slide to note by (param * 
40) Hz on every tick
-                       CMD_S3MCMDEX,           // Add (param * 80) Hz to 
sample frequency
-                       CMD_VIBRATO,            // Add (param * 669) Hz on 
every other tick
-                       CMD_SPEED,                      // Set ticks per row
-                       CMD_PANNINGSLIDE,       // Extended UNIS 669 effect
-                       CMD_RETRIG,                     // Extended UNIS 669 
effect
+                       CMD_PORTAMENTOUP,    // Slide up (param * 80) Hz on 
every tick
+                       CMD_PORTAMENTODOWN,  // Slide down (param * 80) Hz on 
every tick
+                       CMD_TONEPORTAMENTO,  // Slide to note by (param * 40) 
Hz on every tick
+                       CMD_S3MCMDEX,        // Add (param * 80) Hz to sample 
frequency
+                       CMD_VIBRATO,         // Add (param * 669) Hz on every 
other tick
+                       CMD_SPEED,           // Set ticks per row
+                       CMD_PANNINGSLIDE,    // Extended UNIS 669 effect
+                       CMD_RETRIG,          // Extended UNIS 669 effect
                };
 
                uint8 effect[8] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
0xFF };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.6.9+release.autotools/soundlib/Load_med.cpp 
new/libopenmpt-0.6.10+release.autotools/soundlib/Load_med.cpp
--- old/libopenmpt-0.6.9+release.autotools/soundlib/Load_med.cpp        
2022-03-17 23:10:11.000000000 +0100
+++ new/libopenmpt-0.6.10+release.autotools/soundlib/Load_med.cpp       
2023-03-30 22:33:12.000000000 +0200
@@ -977,6 +977,11 @@
                                ins.VolEnv.dwFlags.set(ENV_ENABLED);
                                needInstruments = true;
                        }
+                       if(size > offsetof(MMDInstrExt, defaultPitch) && 
instrExt.defaultPitch != 0)
+                       {
+                               ins.NoteMap[24] = instrExt.defaultPitch + 
NOTE_MIN + 23;
+                               needInstruments = true;
+                       }
                        if(size > offsetof(MMDInstrExt, volume))
                                ins.nGlobalVol = (instrExt.volume + 1u) / 2u;
                        if(size > offsetof(MMDInstrExt, midiBank))
@@ -1294,19 +1299,19 @@
                        CHANNELINDEX numTracks;
                        ROWINDEX numRows;
                        std::string patName;
-                       int transpose;
+                       int transpose = NOTE_MIN + 47 + 
songHeader.playTranspose;
                        FileReader cmdExt;
 
                        if(version < 1)
                        {
-                               transpose = NOTE_MIN + 47;
                                MMD0PatternHeader patHeader;
                                file.ReadStruct(patHeader);
                                numTracks = patHeader.numTracks;
                                numRows = patHeader.numRows + 1;
                        } else
                        {
-                               transpose = NOTE_MIN + (version <= 2 ? 47 : 23) 
+ songHeader.playTranspose;
+                               if(version > 2)
+                                       transpose -= 24;
                                MMD1PatternHeader patHeader;
                                file.ReadStruct(patHeader);
                                numTracks = patHeader.numTracks;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.6.9+release.autotools/soundlib/Load_mod.cpp 
new/libopenmpt-0.6.10+release.autotools/soundlib/Load_mod.cpp
--- old/libopenmpt-0.6.9+release.autotools/soundlib/Load_mod.cpp        
2023-01-01 13:36:14.000000000 +0100
+++ new/libopenmpt-0.6.10+release.autotools/soundlib/Load_mod.cpp       
2023-03-30 22:33:12.000000000 +0200
@@ -713,6 +713,7 @@
        {
                result.madeWithTracker = UL_("NoiseTracker");
                result.isNoiseTracker = true;
+               result.setMODVBlankTiming = true;
                result.numChannels = 4;
        } else if(IsMagic(magic, "OKTA")
                  || IsMagic(magic, "OCTA"))
@@ -813,8 +814,6 @@
                return false;
        }
 
-       InitializeGlobals(MOD_TYPE_MOD);
-
        MODMagicResult modMagicResult;
        if(!CheckMODMagic(magic, modMagicResult)
           || modMagicResult.numChannels < 1
@@ -828,6 +827,7 @@
                return true;
        }
 
+       InitializeGlobals(MOD_TYPE_MOD);
        m_nChannels = modMagicResult.numChannels;
 
        bool isNoiseTracker = modMagicResult.isNoiseTracker;
@@ -845,7 +845,6 @@
 
        // Startrekker 8 channel mod (needs special treatment, see below)
        const bool isFLT8 = isStartrekker && m_nChannels == 8;
-       // Only apply VBlank tests to M.K. (ProTracker) modules.
        const bool isMdKd = IsMagic(magic, "M.K.");
        // Adjust finetune values for modules saved with "His Master's 
Noisetracker"
        const bool isHMNT = IsMagic(magic, "M&K!") || IsMagic(magic, "FEST");
@@ -1295,7 +1294,7 @@
        // In the pattern loader above, a second condition is used: Only tempo 
commands
        // below 100 BPM are taken into account. Furthermore, only M.K. 
(ProTracker)
        // modules are checked.
-       if(isMdKd && hasTempoCommands && !definitelyCIA)
+       if((isMdKd || IsMagic(magic, "M!K!")) && hasTempoCommands && 
!definitelyCIA)
        {
                const double songTime = GetLength(eNoAdjust).front().duration;
                if(songTime >= 480.0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.6.9+release.autotools/soundlib/Load_psm.cpp 
new/libopenmpt-0.6.10+release.autotools/soundlib/Load_psm.cpp
--- old/libopenmpt-0.6.9+release.autotools/soundlib/Load_psm.cpp        
2021-07-10 15:30:49.000000000 +0200
+++ new/libopenmpt-0.6.10+release.autotools/soundlib/Load_psm.cpp       
2023-03-30 22:33:12.000000000 +0200
@@ -2,7 +2,7 @@
  * Load_psm.cpp
  * ------------
  * Purpose: PSM16 and new PSM (ProTracker Studio / Epic MegaGames MASI) module 
loader
- * Notes  : This is partly based on 
http://www.shikadi.net/moddingwiki/ProTracker_Studio_Module
+ * Notes  : This is partly based on 
https://moddingwiki.shikadi.net/wiki/ProTracker_Studio_Module
  *          and partly reverse-engineered. Also thanks to the author of 
foo_dumb, the source code gave me a few clues. :)
  * Authors: Johannes Schultz
  * The OpenMPT source code is released under the BSD license. Read LICENSE for 
more details.
@@ -173,6 +173,34 @@
            , channelVolume(MAX_BASECHANNELS, 64)
            , channelSurround(MAX_BASECHANNELS, false)
        { }
+
+       void SetPanning(CHANNELINDEX chn, uint8 type, int16 pan, bool 
&subsongPanningDiffers, std::vector<PSMSubSong> &subsongs)
+       {
+               if(chn >= channelPanning.size())
+                       return;
+               switch(type)
+               {
+                       case 0:  // use panning
+                               if(pan >= 0)
+                                       channelPanning[chn] = 
static_cast<uint8>(pan ^ 128);
+                               channelSurround[chn] = false;
+                               break;
+                       case 2:  // surround
+                               channelPanning[chn] = 128;
+                               channelSurround[chn] = true;
+                               break;
+                       case 4:  // center
+                               channelPanning[chn] = 128;
+                               channelSurround[chn] = false;
+                               break;
+               }
+               if(!subsongPanningDiffers && !subsongs.empty())
+               {
+                       if(subsongs.back().channelPanning[chn] != 
channelPanning[chn]
+                               || subsongs.back().channelSurround[chn] != 
channelSurround[chn])
+                               subsongPanningDiffers = true;
+               }
+       }
 };
 
 
@@ -388,7 +416,6 @@
                                                // In theory, a tempo item 
inbetween two order items should modify the
                                                // tempo when switching 
patterns. No module uses this feature in practice
                                                // though, so we can keep our 
loader simple.
-                                               // Unimplemented opcodes do 
nothing or freeze MASI.
                                                switch(opcode)
                                                {
                                                case 0x01: // Play order list 
item
@@ -408,20 +435,32 @@
                                                        }
                                                        break;
 
-                                               // 0x02: Play Range
-                                               // 0x03: Jump Loop
+                                               case 0x02: // Play Range (xx 
from line yy to line zz). Three 16-bit parameters but it seems like the next 
opcode is parsed at the same position as the third parameter.
+                                                       subChunk.Skip(4);
+                                                       break;
 
-                                               case 0x04: // Jump Line 
(Restart position)
+                                               case 0x03:  // Jump Loop (like 
Jump Line, but with a third, unknown byte following - nope, it does not appear 
to be a loop count)
+                                               case 0x04:  // Jump Line 
(Restart position)
                                                        {
                                                                uint16 
restartChunk = subChunk.ReadUint16LE();
                                                                if(restartChunk 
>= firstOrderChunk)
-                                                                       
subsong.restartPos = static_cast<ORDERINDEX>(restartChunk - firstOrderChunk);   
// Close enough - we assume that order list is continuous (like in any 
real-world PSM)
+                                                                       
subsong.restartPos = static_cast<ORDERINDEX>(restartChunk - firstOrderChunk);  
// Close enough - we assume that order list is continuous (like in any 
real-world PSM)
                                                                
Order().SetRestartPos(subsong.restartPos);
+                                                               if(opcode == 
0x03)
+                                                                       
subChunk.Skip(1);
                                                        }
                                                        break;
 
-                                               // 0x05: Channel Flip
-                                               // 0x06: Transpose
+                                               case 0x05: // Channel Flip 
(changes channel type without changing pan position)
+                                                       {
+                                                               const auto 
[chn, type] = subChunk.ReadArray<uint8, 2>();
+                                                               
subsong.SetPanning(chn, type, -1, subsongPanningDiffers, subsongs);
+                                                       }
+                                                       break;
+
+                                               case 0x06: // Transpose 
(appears to be a no-op in MASI)
+                                                       subChunk.Skip(1);
+                                                       break;
 
                                                case 0x07: // Default Speed
                                                        subsong.defaultSpeed = 
subChunk.ReadUint8();
@@ -452,33 +491,7 @@
                                                case 0x0D: // Channel panning 
table - can be set using CONVERT.EXE /E
                                                        {
                                                                const auto 
[chn, pan, type] = subChunk.ReadArray<uint8, 3>();
-                                                               if(chn < 
subsong.channelPanning.size())
-                                                               {
-                                                                       
switch(type)
-                                                                       {
-                                                                       case 0: 
// use panning
-                                                                               
subsong.channelPanning[chn] = pan ^ 128;
-                                                                               
subsong.channelSurround[chn] = false;
-                                                                               
break;
-
-                                                                       case 2: 
// surround
-                                                                               
subsong.channelPanning[chn] = 128;
-                                                                               
subsong.channelSurround[chn] = true;
-                                                                               
break;
-
-                                                                       case 4: 
// center
-                                                                               
subsong.channelPanning[chn] = 128;
-                                                                               
subsong.channelSurround[chn] = false;
-                                                                               
break;
-
-                                                                       }
-                                                                       
if(subsongPanningDiffers == false && subsongs.size() > 0)
-                                                                       {
-                                                                               
if(subsongs.back().channelPanning[chn] != subsong.channelPanning[chn]
-                                                                               
|| subsongs.back().channelSurround[chn] != subsong.channelSurround[chn])
-                                                                               
        subsongPanningDiffers = true;
-                                                                       }
-                                                               }
+                                                               
subsong.SetPanning(chn, type, pan, subsongPanningDiffers, subsongs);
                                                        }
                                                        break;
 
@@ -493,7 +506,7 @@
                                                        break;
 
                                                default:
-                                                       // Should never happen 
in "real" PSM files. But in this case, we have to quit as we don't know how big 
the chunk really is.
+                                                       // Non-existent opcode, 
MASI would just freeze in this case.
                                                        return false;
 
                                                }
@@ -511,26 +524,7 @@
                                                break;
 
                                        const auto [type, pan] = 
subChunk.ReadArray<uint8, 2>();
-                                       switch(type)
-                                       {
-                                       case 0: // use panning
-                                               subsong.channelPanning[chn] = 
pan ^ 128;
-                                               subsong.channelSurround[chn] = 
false;
-                                               break;
-
-                                       case 2: // surround
-                                               subsong.channelPanning[chn] = 
128;
-                                               subsong.channelSurround[chn] = 
true;
-                                               break;
-
-                                       case 4: // center
-                                               subsong.channelPanning[chn] = 
128;
-                                               subsong.channelSurround[chn] = 
false;
-                                               break;
-
-                                       default:
-                                               break;
-                                       }
+                                       subsong.SetPanning(chn, type, pan, 
subsongPanningDiffers, subsongs);
                                }
                                break;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.6.9+release.autotools/soundlib/Load_sfx.cpp 
new/libopenmpt-0.6.10+release.autotools/soundlib/Load_sfx.cpp
--- old/libopenmpt-0.6.9+release.autotools/soundlib/Load_sfx.cpp        
2022-02-14 09:52:01.000000000 +0100
+++ new/libopenmpt-0.6.10+release.autotools/soundlib/Load_sfx.cpp       
2023-03-18 21:18:58.000000000 +0100
@@ -17,18 +17,44 @@
 // File Header
 struct SFXFileHeader
 {
-       uint8be numOrders;
-       uint8be restartPos;
-       uint8be orderList[128];
+       char     magic[4];
+       uint16be speed;
+       char     unknown[14];  // Just NUL bytes most of the time, sometimes 
appears to contain leftovers from other data structures
+
+       bool IsValid(const uint8 expectedNumSamples) const noexcept
+       {
+               if(expectedNumSamples == 15 && memcmp(magic, "SONG", 4))
+                       return false;
+               if(expectedNumSamples == 31 && memcmp(magic, "SO31", 4))
+                       return false;
+               return speed >= 178;
+       }
+};
+
+MPT_BINARY_STRUCT(SFXFileHeader, 20)
+
+
+// Order List
+struct SFXOrderHeader
+{
+       uint8 numOrders;
+       uint8 restartPos;
+       uint8 orderList[128];
+
+       bool IsValid() const noexcept
+       {
+               return numOrders <= 128;
+       }
 };
 
-MPT_BINARY_STRUCT(SFXFileHeader, 130)
+MPT_BINARY_STRUCT(SFXOrderHeader, 130)
+
 
 // Sample Header
 struct SFXSampleHeader
 {
        char     name[22];
-       char     dummy[2];      // Supposedly sample length, but almost always 
incorrect
+       char     dummy[2];  // Supposedly sample length, but almost always 
incorrect
        uint8be  finetune;
        uint8be  volume;
        uint16be loopStart;
@@ -96,79 +122,42 @@
 }
 
 
-static bool ValidateHeader(const SFXFileHeader &fileHeader)
-{
-       if(fileHeader.numOrders > 128)
-       {
-               return false;
-       }
-       return true;
-}
-
-
 CSoundFile::ProbeResult CSoundFile::ProbeFileHeaderSFX(MemoryFileReader file, 
const uint64 *pfilesize)
 {
        SAMPLEINDEX numSamples = 0;
-       if(numSamples == 0)
+       SFXFileHeader fileHeader;
+
+       if(!file.LengthIsAtLeast(0x3C + sizeof(SFXFileHeader)))
+               return ProbeWantMoreData;
+       if(file.Seek(0x3C) && file.ReadStruct(fileHeader) && 
fileHeader.IsValid(15))
        {
-               file.Rewind();
-               if(!file.CanRead(0x40))
-               {
-                       return ProbeWantMoreData;
-               }
-               if(file.Seek(0x3c) && file.ReadMagic("SONG"))
-               {
-                       numSamples = 15;
-               }
-       }
-       if(numSamples == 0)
+               numSamples = 15;
+       } else
        {
-               file.Rewind();
-               if(!file.CanRead(0x80))
-               {
+               if(!file.LengthIsAtLeast(0x7C + sizeof(SFXFileHeader)))
                        return ProbeWantMoreData;
-               }
-               if(file.Seek(0x7C) && file.ReadMagic("SO31"))
-               {
+               if(file.Seek(0x7C) && file.ReadStruct(fileHeader) && 
fileHeader.IsValid(31))
                        numSamples = 31;
-               }
-       }
-       if(numSamples == 0)
-       {
-               return ProbeFailure;
+               else
+                       return ProbeFailure;
        }
+       
        file.Rewind();
        for(SAMPLEINDEX smp = 0; smp < numSamples; smp++)
        {
                if(file.ReadUint32BE() > 131072)
-               {
                        return ProbeFailure;
-               }
-       }
-       file.Skip(4);
-       if(!file.CanRead(2))
-       {
-               return ProbeWantMoreData;
        }
-       uint16 speed = file.ReadUint16BE();
-       if(speed < 178)
-       {
-               return ProbeFailure;
-       }
-       if(!file.CanRead(sizeof(SFXSampleHeader) * numSamples))
-       {
+
+       if(!file.Skip(sizeof(SFXFileHeader) + sizeof(SFXSampleHeader) * 
numSamples))
                return ProbeWantMoreData;
-       }
-       file.Skip(sizeof(SFXSampleHeader) * numSamples);
-       SFXFileHeader fileHeader;
-       if(!file.ReadStruct(fileHeader))
-       {
+
+       SFXOrderHeader orderHeader;
+       if(!file.ReadStruct(orderHeader))
                return ProbeWantMoreData;
-       }
-       if(!ValidateHeader(fileHeader))
-       {
+       if(!orderHeader.IsValid())
                return ProbeFailure;
-       }
+
        MPT_UNREFERENCED_PARAMETER(pfilesize);
        return ProbeSuccess;
 }
@@ -176,11 +165,12 @@
 
 bool CSoundFile::ReadSFX(FileReader &file, ModLoadingFlags loadFlags)
 {
-       if(file.Seek(0x3C), file.ReadMagic("SONG"))
+       SFXFileHeader fileHeader;
+       if(file.Seek(0x3C) && file.ReadStruct(fileHeader) && 
fileHeader.IsValid(15))
        {
                InitializeGlobals(MOD_TYPE_SFX);
                m_nSamples = 15;
-       } else if(file.Seek(0x7C), file.ReadMagic("SO31"))
+       } else if(file.Seek(0x7C) && file.ReadStruct(fileHeader) && 
fileHeader.IsValid(31))
        {
                InitializeGlobals(MOD_TYPE_SFX);
                m_nSamples = 31;
@@ -198,9 +188,11 @@
                if(sampleLen[smp] > 131072)
                        return false;
        }
+       file.Skip(sizeof(SFXFileHeader));
 
        m_nChannels = 4;
        m_nInstruments = 0;
+       m_nDefaultTempo = TEMPO((14565.0 * 122.0) / fileHeader.speed);
        m_nDefaultSpeed = 6;
        m_nMinPeriod = 14 * 4;
        m_nMaxPeriod = 3424 * 4;
@@ -209,14 +201,6 @@
        // Setup channel pan positions and volume
        SetupMODPanning(true);
 
-       file.Skip(4);
-       uint16 speed = file.ReadUint16BE();
-       if(speed < 178)
-               return false;
-       m_nDefaultTempo = TEMPO((14565.0 * 122.0) / speed);
-
-       file.Skip(14);
-
        uint32 invalidChars = 0;
        for(SAMPLEINDEX smp = 1; smp <= m_nSamples; smp++)
        {
@@ -244,32 +228,24 @@
        // but it should not do that for FFFE (STP) notes - as a consequence, 
they turn into pattern breaks (FFFC).
        const bool fixPatternBreaks = (m_szNames[1] == "BASSE2.AMI") || 
(m_szNames[1] == "PRA1.AMI");
 
-       SFXFileHeader fileHeader;
-       if(!file.ReadStruct(fileHeader))
-       {
-               return false;
-       }
-       if(!ValidateHeader(fileHeader))
-       {
+       SFXOrderHeader orderHeader;
+       if(!file.ReadStruct(orderHeader) || !orderHeader.IsValid())
                return false;
-       }
-       if(loadFlags == onlyVerifyHeader)
-       {
+       else if(loadFlags == onlyVerifyHeader)
                return true;
-       }
 
        PATTERNINDEX numPatterns = 0;
-       for(ORDERINDEX ord = 0; ord < fileHeader.numOrders; ord++)
+       for(ORDERINDEX ord = 0; ord < orderHeader.numOrders; ord++)
        {
-               numPatterns = std::max(numPatterns, 
static_cast<PATTERNINDEX>(fileHeader.orderList[ord] + 1));
+               numPatterns = std::max(numPatterns, 
static_cast<PATTERNINDEX>(orderHeader.orderList[ord] + 1));
        }
 
-       if(fileHeader.restartPos < fileHeader.numOrders)
-               Order().SetRestartPos(fileHeader.restartPos);
+       if(orderHeader.restartPos < orderHeader.numOrders)
+               Order().SetRestartPos(orderHeader.restartPos);
        else
                Order().SetRestartPos(0);
 
-       ReadOrderFromArray(Order(), fileHeader.orderList, fileHeader.numOrders);
+       ReadOrderFromArray(Order(), orderHeader.orderList, 
orderHeader.numOrders);
 
        // SFX v2 / MMS modules have 4 extra bytes here for some reason
        if(m_nSamples == 31)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.6.9+release.autotools/soundlib/Snd_fx.cpp 
new/libopenmpt-0.6.10+release.autotools/soundlib/Snd_fx.cpp
--- old/libopenmpt-0.6.9+release.autotools/soundlib/Snd_fx.cpp  2023-02-19 
00:53:36.000000000 +0100
+++ new/libopenmpt-0.6.10+release.autotools/soundlib/Snd_fx.cpp 2023-04-13 
23:42:51.000000000 +0200
@@ -911,7 +911,9 @@
                // Interpret F00 effect in XM files as "stop song"
                if(GetType() == MOD_TYPE_XM && playState.m_nMusicSpeed == 
uint16_max)
                {
-                       break;
+                       playState.m_nNextRow = playState.m_nRow;
+                       playState.m_nNextOrder = playState.m_nCurrentOrder;
+                       continue;
                }
 
                playState.m_nCurrentRowsPerBeat = m_nDefaultRowsPerBeat;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.6.9+release.autotools/soundlib/Tables.cpp 
new/libopenmpt-0.6.10+release.autotools/soundlib/Tables.cpp
--- old/libopenmpt-0.6.9+release.autotools/soundlib/Tables.cpp  2023-03-01 
20:27:31.000000000 +0100
+++ new/libopenmpt-0.6.10+release.autotools/soundlib/Tables.cpp 2023-03-17 
15:16:17.000000000 +0100
@@ -132,7 +132,7 @@
 #ifdef MODPLUG_TRACKER
        { ModContainerType::WAV,     UL_("Wave"),                     "wav"   },
        { ModContainerType::UAX,     UL_("Unreal Sounds"),            "uax"   },
-       { ModContainerType::Generic, UL_("Generic Archive"),          "???"   },
+       { ModContainerType::Generic, UL_("Generic Archive"),          ""      },
 #endif
 };
 
@@ -153,18 +153,20 @@
        for(const auto &formatInfo : modFormatInfo)
        {
                // Avoid dupes in list
-               if(exts.empty() || strcmp(formatInfo.extension, exts.back()))
-               {
+               const std::string_view ext = formatInfo.extension;
+               if(ext.empty())
+                       continue;
+               if(exts.empty() || ext != exts.back())
                        exts.push_back(formatInfo.extension);
-               }
        }
        for(const auto &containerInfo : modContainerInfo)
        {
                // Avoid dupes in list
-               if(exts.empty() || strcmp(containerInfo.extension, exts.back()))
-               {
-                       exts.push_back(containerInfo.extension);
-               }
+               const std::string_view ext = containerInfo.extension;
+               if(ext.empty())
+                       continue;
+               if(exts.empty() || ext != exts.back())
+                       exts.push_back(ext.data());
        }
 #ifdef MODPLUG_TRACKER
        if(otherFormats)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.6.9+release.autotools/soundlib/tuning.cpp 
new/libopenmpt-0.6.10+release.autotools/soundlib/tuning.cpp
--- old/libopenmpt-0.6.9+release.autotools/soundlib/tuning.cpp  2022-01-13 
22:19:44.000000000 +0100
+++ new/libopenmpt-0.6.10+release.autotools/soundlib/tuning.cpp 2023-04-09 
11:16:46.000000000 +0200
@@ -74,7 +74,15 @@
 {
        m_RatioTable.clear();
        m_NoteMin = s_NoteMinDefault;
+#if MPT_GCC_AT_LEAST(12, 0, 0) && MPT_GCC_BEFORE(13, 1, 0)
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109455
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-overflow"
+#endif
        m_RatioTable.resize(s_RatioTableSizeDefault, 1);
+#if MPT_GCC_AT_LEAST(12, 0, 0) && MPT_GCC_BEFORE(13, 1, 0)
+#pragma GCC diagnostic pop
+#endif
        m_GroupSize = 0;
        m_GroupRatio = 0;
        m_RatioTableFine.clear();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libopenmpt-0.6.9+release.autotools/src/mpt/string_transcode/transcode.hpp 
new/libopenmpt-0.6.10+release.autotools/src/mpt/string_transcode/transcode.hpp
--- 
old/libopenmpt-0.6.9+release.autotools/src/mpt/string_transcode/transcode.hpp   
    2022-03-05 21:53:21.000000000 +0100
+++ 
new/libopenmpt-0.6.10+release.autotools/src/mpt/string_transcode/transcode.hpp  
    2023-04-08 18:30:33.000000000 +0200
@@ -24,6 +24,8 @@
 #endif // !MPT_COMPILER_QUIRK_NO_WCHAR
 #include <vector>
 
+#include <cstddef>
+
 #if MPT_OS_DJGPP
 #include <cstring>
 #endif // MPT_OS_DJGPP

Reply via email to