Hello community,
here is the log from the commit of package libopenmpt for openSUSE:Factory checked in at 2017-06-01 16:28:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libopenmpt (Old)
and /work/SRC/openSUSE:Factory/.libopenmpt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libopenmpt"
Thu Jun 1 16:28:34 2017 rev:2 rq:497306 version:0.2.8043~beta23
Changes:
--------
--- /work/SRC/openSUSE:Factory/libopenmpt/libopenmpt.changes 2017-05-18 20:46:19.872101977 +0200
+++ /work/SRC/openSUSE:Factory/.libopenmpt.new/libopenmpt.changes 2017-06-01 16:28:34.490314826 +0200
@@ -1,0 +2,14 @@
+Mon May 22 12:38:24 UTC 2017 - tchvatal@suse.com
+
+- Add patch fixing issue bsc#1040149 wrong includedir propagation:
+ * libmodpulg-pcfile.patch
+
+-------------------------------------------------------------------
+Mon May 22 12:32:32 UTC 2017 - tchvatal@suse.com
+
+- Version update to 0.2.8043-beta23
+ * foo_openmpt: Interpolation filter and volume ramping settings were
+ confused in previous versions. This version resets both to the defaults.
+- Make mpg123 on by default
+
+-------------------------------------------------------------------
Old:
----
libopenmpt-0.2.7774-beta22-autotools.tar.gz
New:
----
libmodpulg-pcfile.patch
libopenmpt-0.2.8043-beta23-autotools.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libopenmpt.spec ++++++
--- /var/tmp/diff_new_pack.RpZEzs/_old 2017-06-01 16:28:35.238209371 +0200
+++ /var/tmp/diff_new_pack.RpZEzs/_new 2017-06-01 16:28:35.242208806 +0200
@@ -16,13 +16,13 @@
#
-%define rev 0.2.7774
-%define beta beta22
+%define rev 0.2.8043
+%define beta beta23
%define realver %{rev}-%{beta}
%define libplug libmodplug1
%define libopenmpt libopenmpt0
%define libopenmpt_modplug libopenmpt_modplug1
-%bcond_with mpg123
+%bcond_without mpg123
Name: libopenmpt
Version: %{rev}~%{beta}
Release: 0
@@ -31,6 +31,8 @@
Group: Productivity/Multimedia/Other
Url: https://lib.openmpt.org/libopenmpt/
Source: https://lib.openmpt.org/files/libopenmpt/src/%{name}-%{realver}-autotools.tar.gz
+# PATCH-FIX-UPSTREAM: modplug pc file needs to have full path
+Patch0: libmodpulg-pcfile.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: dos2unix
@@ -116,6 +118,7 @@
%prep
%setup -q -n %{name}-%{rev}-autotools
+%patch0 -p1
# disable werror
sed -i -e 's:-Werror ::g' configure.ac
# fix encoding
++++++ libmodpulg-pcfile.patch ++++++
Index: libopenmpt-0.2.8043-autotools/libmodplug/libmodplug.pc.in
===================================================================
--- libopenmpt-0.2.8043-autotools.orig/libmodplug/libmodplug.pc.in
+++ libopenmpt-0.2.8043-autotools/libmodplug/libmodplug.pc.in
@@ -1,7 +1,7 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-includedir=${prefix}/include
+includedir=${prefix}/include/libmodplug/
Name: libmodplug
Description: The ModPlug mod file playing library (emulated via libopenmpt).
++++++ libopenmpt-0.2.7774-beta22-autotools.tar.gz -> libopenmpt-0.2.8043-beta23-autotools.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/Makefile.am new/libopenmpt-0.2.8043-autotools/Makefile.am
--- old/libopenmpt-0.2.7774-autotools/Makefile.am 2017-03-07 11:27:56.000000000 +0100
+++ new/libopenmpt-0.2.8043-autotools/Makefile.am 2017-04-23 15:20:01.000000000 +0200
@@ -105,7 +105,7 @@
pkgconfig_DATA += libopenmpt/libopenmpt.pc
lib_LTLIBRARIES += libopenmpt.la
-libopenmpt_la_LDFLAGS = -version-info 0:22:0
+libopenmpt_la_LDFLAGS = -version-info 0:23:0
nobase_include_HEADERS += libopenmpt/libopenmpt.h libopenmpt/libopenmpt.hpp libopenmpt/libopenmpt_version.h libopenmpt/libopenmpt_config.h libopenmpt/libopenmpt_stream_callbacks_fd.h libopenmpt/libopenmpt_stream_callbacks_file.h libopenmpt/libopenmpt_ext.hpp
libopenmpt_la_CPPFLAGS = -DLIBOPENMPT_BUILD -I$(srcdir)/build/svn_version -I$(srcdir)/ -I$(srcdir)/common $(ZLIB_CFLAGS) $(MPG123_CFLAGS) $(OGG_CFLAGS) $(VORBIS_CFLAGS) $(VORBISFILE_CFLAGS) $(LTDL_CPPFLAGS) $(DL_CPPFLAGS)
libopenmpt_la_CXXFLAGS = $(ZLIB_CFLAGS) $(MPG123_CFLAGS) $(OGG_CFLAGS) $(VORBIS_CFLAGS) $(VORBISFILE_CFLAGS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/Makefile.in new/libopenmpt-0.2.8043-autotools/Makefile.in
--- old/libopenmpt-0.2.7774-autotools/Makefile.in 2017-03-11 13:14:15.000000000 +0100
+++ new/libopenmpt-0.2.8043-autotools/Makefile.in 2017-04-23 15:25:32.000000000 +0200
@@ -1184,7 +1184,7 @@
libopenmpt/libopenmpt_stream_callbacks_fd.h \
libopenmpt/libopenmpt_stream_callbacks_file.h \
libopenmpt/libopenmpt_ext.hpp $(am__append_7)
-libopenmpt_la_LDFLAGS = -version-info 0:22:0
+libopenmpt_la_LDFLAGS = -version-info 0:23:0
libopenmpt_la_CPPFLAGS = -DLIBOPENMPT_BUILD -I$(srcdir)/build/svn_version -I$(srcdir)/ -I$(srcdir)/common $(ZLIB_CFLAGS) $(MPG123_CFLAGS) $(OGG_CFLAGS) $(VORBIS_CFLAGS) $(VORBISFILE_CFLAGS) $(LTDL_CPPFLAGS) $(DL_CPPFLAGS)
libopenmpt_la_CXXFLAGS = $(ZLIB_CFLAGS) $(MPG123_CFLAGS) $(OGG_CFLAGS) $(VORBIS_CFLAGS) $(VORBISFILE_CFLAGS)
libopenmpt_la_CFLAGS = $(ZLIB_CFLAGS) $(MPG123_CFLAGS) $(OGG_CFLAGS) $(VORBIS_CFLAGS) $(VORBISFILE_CFLAGS)
@@ -5598,8 +5598,8 @@
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-@DX_COND_doc_FALSE@install-data-local:
@DX_COND_doc_FALSE@uninstall-local:
+@DX_COND_doc_FALSE@install-data-local:
@DX_COND_doc_FALSE@clean-local:
clean: clean-am
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/common/mptCPU.cpp new/libopenmpt-0.2.8043-autotools/common/mptCPU.cpp
--- old/libopenmpt-0.2.7774-autotools/common/mptCPU.cpp 2015-08-15 08:42:50.000000000 +0200
+++ new/libopenmpt-0.2.8043-autotools/common/mptCPU.cpp 2017-04-04 18:12:19.000000000 +0200
@@ -18,6 +18,7 @@
#if defined(ENABLE_ASM)
+uint32 RealProcSupport = 0;
uint32 ProcSupport = 0;
char ProcVendorID[16+1] = "";
uint16 ProcFamily = 0;
@@ -114,6 +115,7 @@
//--------------------
{
+ RealProcSupport = 0;
ProcSupport = 0;
MemsetZero(ProcVendorID);
ProcFamily = 0;
@@ -266,6 +268,8 @@
// We do not have to check if SSE got enabled by the OS because we only do
// support Windows >= 98 SE which will always enable SSE if available.
+ RealProcSupport = ProcSupport;
+
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/common/mptCPU.h new/libopenmpt-0.2.8043-autotools/common/mptCPU.h
--- old/libopenmpt-0.2.7774-autotools/common/mptCPU.h 2015-06-27 16:41:53.000000000 +0200
+++ new/libopenmpt-0.2.8043-autotools/common/mptCPU.h 2017-04-04 18:12:19.000000000 +0200
@@ -29,16 +29,24 @@
#define PROCSUPPORT_SSSE3 0x00800 // Processor supports SSSE3 instructions
#define PROCSUPPORT_SSE4_1 0x01000 // Processor supports SSE4.1 instructions
#define PROCSUPPORT_SSE4_2 0x02000 // Processor supports SSE4.2 instructions
+extern uint32 RealProcSupport;
extern uint32 ProcSupport;
extern char ProcVendorID[16+1];
extern uint16 ProcFamily;
extern uint8 ProcModel;
extern uint8 ProcStepping;
void InitProcSupport();
+// enabled processor features for inline asm and intrinsics
static inline uint32 GetProcSupport()
{
return ProcSupport;
}
+// available processor features
+static inline uint32 GetRealProcSupport()
+{
+ return RealProcSupport;
+}
+
#endif // ENABLE_ASM
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/common/versionNumber.h new/libopenmpt-0.2.8043-autotools/common/versionNumber.h
--- old/libopenmpt-0.2.7774-autotools/common/versionNumber.h 2017-02-05 18:04:19.000000000 +0100
+++ new/libopenmpt-0.2.8043-autotools/common/versionNumber.h 2017-04-23 15:03:22.000000000 +0200
@@ -18,8 +18,8 @@
//Version definitions. The only thing that needs to be changed when changing version number.
#define VER_MAJORMAJOR 1
#define VER_MAJOR 26
-#define VER_MINOR 08
-#define VER_MINORMINOR 01
+#define VER_MINOR 10
+#define VER_MINORMINOR 00
//Version string. For example "1.17.02.28"
#define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/configure new/libopenmpt-0.2.8043-autotools/configure
--- old/libopenmpt-0.2.7774-autotools/configure 2017-03-11 13:14:13.000000000 +0100
+++ new/libopenmpt-0.2.8043-autotools/configure 2017-04-23 15:25:31.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.2.7774-autotools.
+# Generated by GNU Autoconf 2.69 for libopenmpt 0.2.8043-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.2.7774-autotools'
-PACKAGE_STRING='libopenmpt 0.2.7774-autotools'
+PACKAGE_VERSION='0.2.8043-autotools'
+PACKAGE_STRING='libopenmpt 0.2.8043-autotools'
PACKAGE_BUGREPORT='https://bugs.openmpt.org/'
PACKAGE_URL='https://lib.openmpt.org/'
@@ -1477,7 +1477,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.2.7774-autotools to adapt to many kinds of systems.
+\`configure' configures libopenmpt 0.2.8043-autotools to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1547,7 +1547,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libopenmpt 0.2.7774-autotools:";;
+ short | recursive ) echo "Configuration of libopenmpt 0.2.8043-autotools:";;
esac
cat <<\_ACEOF
@@ -1742,7 +1742,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libopenmpt configure 0.2.7774-autotools
+libopenmpt configure 0.2.8043-autotools
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2232,7 +2232,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.2.7774-autotools, which was
+It was created by libopenmpt $as_me 0.2.8043-autotools, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3103,7 +3103,7 @@
# Define the identity of the package.
PACKAGE='libopenmpt'
- VERSION='0.2.7774-autotools'
+ VERSION='0.2.8043-autotools'
cat >>confdefs.h <<_ACEOF
@@ -16645,10 +16645,10 @@
$as_echo "#define MPT_SVNURL \"https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.26\"" >>confdefs.h
-$as_echo "#define MPT_SVNVERSION \"7774\"" >>confdefs.h
+$as_echo "#define MPT_SVNVERSION \"8043\"" >>confdefs.h
-$as_echo "#define MPT_SVNDATE \"2017-03-11T12:09:52.920849Z\"" >>confdefs.h
+$as_echo "#define MPT_SVNDATE \"2017-04-23T13:20:01.390569Z\"" >>confdefs.h
$as_echo "#define MPT_PACKAGE true" >>confdefs.h
@@ -21303,7 +21303,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.2.7774-autotools, which was
+This file was extended by libopenmpt $as_me 0.2.8043-autotools, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21370,7 +21370,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.2.7774-autotools
+libopenmpt config.status 0.2.8043-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.2.7774-autotools/configure.ac new/libopenmpt-0.2.8043-autotools/configure.ac
--- old/libopenmpt-0.2.7774-autotools/configure.ac 2017-03-11 13:14:03.000000000 +0100
+++ new/libopenmpt-0.2.8043-autotools/configure.ac 2017-04-23 15:25:23.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT([libopenmpt], [0.2.7774-autotools], [https://bugs.openmpt.org/], [libopenmpt], [https://lib.openmpt.org/])
+AC_INIT([libopenmpt], [0.2.8043-autotools], [https://bugs.openmpt.org/], [libopenmpt], [https://lib.openmpt.org/])
AC_PREREQ([2.68])
AC_CONFIG_MACRO_DIR([m4])
@@ -21,8 +21,8 @@
AC_PROG_INSTALL
AC_DEFINE([MPT_SVNURL], ["https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.26"], [svn version])
-AC_DEFINE([MPT_SVNVERSION], ["7774"], [svn version])
-AC_DEFINE([MPT_SVNDATE], ["2017-03-11T12:09:52.920849Z"], [svn date])
+AC_DEFINE([MPT_SVNVERSION], ["8043"], [svn version])
+AC_DEFINE([MPT_SVNDATE], ["2017-04-23T13:20:01.390569Z"], [svn date])
AC_DEFINE([MPT_PACKAGE], [true], [is package])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/libopenmpt/dox/changelog.md new/libopenmpt-0.2.8043-autotools/libopenmpt/dox/changelog.md
--- old/libopenmpt-0.2.7774-autotools/libopenmpt/dox/changelog.md 2017-03-11 13:09:52.000000000 +0100
+++ new/libopenmpt-0.2.8043-autotools/libopenmpt/dox/changelog.md 2017-04-23 15:20:01.000000000 +0200
@@ -5,6 +5,15 @@
For fully detailed change log, please see the source repository directly. This
is just a high-level summary.
+### libopenmpt 0.2-beta23 (2017-04-23)
+
+ * [**Change**] The libmpg123 binary download script on Windows now downloads
+ libmpg123 1.24.0.
+ * [**Change**] MSVC builds of libopenmpt will now only load known DMO plugins.
+
+ * [**Bug**] foo_openmpt: Interpolation filter and volume ramping settings were
+ confused in previous versions. This version resets both to the defaults.
+
### libopenmpt 0.2-beta22 (2017-03-11)
* [**Bug**] Possible NULL-pointer dereference read during obscure
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/man/openmpt123.1 new/libopenmpt-0.2.8043-autotools/man/openmpt123.1
--- old/libopenmpt-0.2.7774-autotools/man/openmpt123.1 2017-03-11 13:14:03.000000000 +0100
+++ new/libopenmpt-0.2.8043-autotools/man/openmpt123.1 2017-04-23 15:25:23.000000000 +0200
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.4.
-.TH OPENMPT123 "1" "March 2017" "openmpt123 v0.2" "User Commands"
+.TH OPENMPT123 "1" "April 2017" "openmpt123 v0.2" "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.2.7774-autotools/soundlib/Load_it.cpp new/libopenmpt-0.2.8043-autotools/soundlib/Load_it.cpp
--- old/libopenmpt-0.2.7774-autotools/soundlib/Load_it.cpp 2016-09-08 16:31:30.000000000 +0200
+++ new/libopenmpt-0.2.8043-autotools/soundlib/Load_it.cpp 2017-04-20 00:05:56.000000000 +0200
@@ -2323,7 +2323,7 @@
uint8 b = chunk.ReadUint8();
for(uint8 i = 0; i < 8; i++, bit++)
{
- if((b & (1 << i)) && bit < m_playBehaviour.size())
+ if((b & (1 << i)) && bit <= kFT2FinetunePrecision)
{
m_playBehaviour.set(bit);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/soundlib/Load_mo3.cpp new/libopenmpt-0.2.8043-autotools/soundlib/Load_mo3.cpp
--- old/libopenmpt-0.2.7774-autotools/soundlib/Load_mo3.cpp 2017-03-10 14:12:36.000000000 +0100
+++ new/libopenmpt-0.2.8043-autotools/soundlib/Load_mo3.cpp 2017-04-03 22:34:10.000000000 +0200
@@ -2027,10 +2027,11 @@
}
}
- if((GetType() == MOD_TYPE_IT && cwtv > 0x0100 && cwtv < 0x0214)
- || (GetType() == MOD_TYPE_S3M && cwtv > 0x3100 && cwtv < 0x3214))
+ if((GetType() == MOD_TYPE_IT && cwtv >= 0x0100 && cwtv < 0x0214)
+ || (GetType() == MOD_TYPE_S3M && cwtv >= 0x3100 && cwtv < 0x3214)
+ || (GetType() == MOD_TYPE_S3M && cwtv >= 0x1300 && cwtv < 0x1320))
{
- // Ignore MIDI data in files made with IT older than version 2.14.
+ // Ignore MIDI data in files made with IT older than version 2.14 and old ST3 versions.
MemsetZero(m_MidiCfg.szMidiSFXExt);
MemsetZero(m_MidiCfg.szMidiZXXExt);
m_SongFlags.set(SONG_EMBEDMIDICFG);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/soundlib/Load_mod.cpp new/libopenmpt-0.2.8043-autotools/soundlib/Load_mod.cpp
--- old/libopenmpt-0.2.7774-autotools/soundlib/Load_mod.cpp 2017-03-10 01:02:39.000000000 +0100
+++ new/libopenmpt-0.2.8043-autotools/soundlib/Load_mod.cpp 2017-04-03 22:34:10.000000000 +0200
@@ -439,13 +439,11 @@
// Parse the order list to determine how many patterns are used in the file.
-static PATTERNINDEX GetNumPatterns(const FileReader &file, ModSequence &Order, ORDERINDEX numOrders, size_t totalSampleLen, CHANNELINDEX &numChannels, bool checkForWOW)
-//----------------------------------------------------------------------------------------------------------------------------------------------------------------------
+static PATTERNINDEX GetNumPatterns(FileReader &file, ModSequence &Order, ORDERINDEX numOrders, SmpLength totalSampleLen, CHANNELINDEX &numChannels, bool checkForWOW)
+//-------------------------------------------------------------------------------------------------------------------------------------------------------------------
{
PATTERNINDEX numPatterns = 0; // Total number of patterns in file (determined by going through the whole order list) with pattern number < 128
-#ifdef _DEBUG
PATTERNINDEX officialPatterns = 0; // Number of patterns only found in the "official" part of the order list (i.e. order positions < claimed order length)
-#endif
PATTERNINDEX numPatternsIllegal = 0; // Total number of patterns in file, also counting in "invalid" pattern indexes >= 128
for(ORDERINDEX ord = 0; ord < 128; ord++)
@@ -454,12 +452,10 @@
if(pat < 128 && numPatterns <= pat)
{
numPatterns = pat + 1;
-#ifdef _DEBUG
if(ord < numOrders)
{
officialPatterns = numPatterns;
}
-#endif
}
if(pat >= numPatternsIllegal)
{
@@ -476,11 +472,42 @@
const size_t patternStartOffset = file.GetPosition();
const size_t sizeWithoutPatterns = totalSampleLen + patternStartOffset;
- // Check if this is a Mod's Grave WOW file... Never seen one of those, but apparently they *do* exist.
- // Basically, WOW files seem to use the M.K. extensions, but are actually 8CHN files.
if(checkForWOW && sizeWithoutPatterns + numPatterns * 8 * 256 == file.GetLength())
{
+ // Check if this is a Mod's Grave WOW file... Never seen one of those, but apparently they *do* exist.
+ // WOW files should use the M.K. magic but are actually 8CHN files.
numChannels = 8;
+ } else if(numPatterns != officialPatterns && numChannels == 4 && !checkForWOW)
+ {
+ // Fix SoundTracker modules where "hidden" patterns should be ignored.
+ // razor-1911.mod (MD5 b75f0f471b0ae400185585ca05bf7fe8, SHA1 4de31af234229faec00f1e85e1e8f78f405d454b)
+ // and captain_fizz.mod (MD5 55bd89fe5a8e345df65438dbfc2df94e, SHA1 9e0e8b7dc67939885435ea8d3ff4be7704207a43)
+ // seem to have the "correct" file size when only taking the "official" patterns into account,
+ // but they only play correctly when also loading the inofficial patterns.
+ // On the other hand, the SoundTracker module
+ // wolf1.mod (MD5 a4983d7a432d324ce8261b019257f4ed, SHA1 aa6b399d02546bcb6baf9ec56a8081730dea3f44),
+ // wolf3.mod (MD5 af60840815aa9eef43820a7a04417fa6, SHA1 24d6c2e38894f78f6c5c6a4b693a016af8fa037b)
+ // and jean_baudlot_-_bad_dudes_vs_dragonninja-dragonf.mod (MD5 fa48e0f805b36bdc1833f6b82d22d936, SHA1 39f2f8319f4847fe928b9d88eee19d79310b9f91)
+ // only play correctly if we ignore the hidden patterns.
+ // Hence, we have a peek at the first hidden pattern and check if it contains a lot of illegal data.
+ // If that is the case, we assume it's part of the sample data and only consider the "official" patterns.
+ file.Seek(patternStartOffset + officialPatterns * 1024);
+ int illegalBytes = 0;
+ for(int i = 0; i < 256; i++)
+ {
+ uint8 data[4];
+ file.ReadArray(data);
+ if(data[0] & 0xE0)
+ {
+ illegalBytes++;
+ if(illegalBytes > 64)
+ {
+ numPatterns = officialPatterns;
+ break;
+ }
+ }
+ }
+ file.Seek(patternStartOffset);
}
#ifdef _DEBUG
@@ -489,15 +516,9 @@
// Interestingly, (broken) variants of the ProTracker modules
// "killing butterfly" (MD5 bd676358b1dbb40d40f25435e845cf6b, SHA1 9df4ae21214ff753802756b616a0cafaeced8021),
// "quartex" by Reflex (MD5 35526bef0fb21cb96394838d94c14bab, SHA1 116756c68c7b6598dcfbad75a043477fcc54c96c),
- // and the SoundTracker modules
- // razor-1911.mod (MD5 b75f0f471b0ae400185585ca05bf7fe8, SHA1 4de31af234229faec00f1e85e1e8f78f405d454b)
- // and captain_fizz.mod (MD5 55bd89fe5a8e345df65438dbfc2df94e, SHA1 9e0e8b7dc67939885435ea8d3ff4be7704207a43)
// seem to have the "correct" file size when only taking the "official" patterns into account, but they only play
// correctly when also loading the inofficial patterns.
- // On the other hand, the SoundTracker module
- // wolf1.mod (MD5 a4983d7a432d324ce8261b019257f4ed, SHA1 aa6b399d02546bcb6baf9ec56a8081730dea3f44)
- // does not play correctly with the current code. It's just a short jingle, though, so it's probably less
- // important to play correctly than the aforementioned modules.
+ // See also the above check for ambiguities with SoundTracker modules.
// Keep this assertion in the code to find potential other broken MODs.
if(numPatterns != officialPatterns && sizeWithoutPatterns + officialPatterns * numChannels * 256 == file.GetLength())
{
@@ -1043,8 +1064,8 @@
ReadSample(file, sampleHeader, Samples[smp], m_szNames[smp], true);
invalidChars += CountInvalidChars(sampleHeader.name);
- // Sanity checks
- if(invalidChars > 20
+ // Sanity checks - invalid character count adjusted for ata.mod (MD5 937b79b54026fa73a1a4d3597c26eace, SHA1 3322ca62258adb9e0ae8e9afe6e0c29d39add874)
+ if(invalidChars > 48
|| sampleHeader.volume > 64
|| sampleHeader.finetune != 0
|| sampleHeader.length > 32768)
@@ -1145,6 +1166,7 @@
// Scan patterns to identify Ultimate Soundtracker modules.
uint8 emptyCmds = 0;
uint8 numDxx = 0;
+ uint32 illegalBytes = 0;
for(uint32 i = 0; i < numPatterns * 64u * 4u; i++)
{
uint8 data[4];
@@ -1152,6 +1174,18 @@
const ROWINDEX row = (i / 4u) % 64u;
const bool firstInPattern = (i % (64u * 4u)) == 0;
const uint8 eff = data[2] & 0x0F, param = data[3];
+ if(data[0] & 0xF0)
+ {
+ illegalBytes++;
+ // Reject files that contain a lot of illegal pattern data.
+ // STK.the final remix (MD5 5ff13cdbd77211d1103be7051a7d89c9, SHA1 e94dba82a5da00a4758ba0c207eb17e3a89c3aa3)
+ // has one illegal byte, so we only reject after an arbitrary threshold has been passed.
+ // This also allows to play some rather damaged files like
+ // crockets.mod (MD5 995ed9f44cab995a0eeb19deb52e2a8b, SHA1 6c79983c3b7d55c9bc110b625eaa07ce9d75f369)
+ // but naturally we cannot recover the broken data.
+ if(illegalBytes > 1024)
+ return false;
+ }
// Check for empty space between the last Dxx command and the beginning of another pattern
if(emptyCmds != 0 && !firstInPattern && !memcmp(data, "\0\0\0\0", 4))
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/soundlib/Load_stm.cpp new/libopenmpt-0.2.8043-autotools/soundlib/Load_stm.cpp
--- old/libopenmpt-0.2.7774-autotools/soundlib/Load_stm.cpp 2016-07-24 02:55:40.000000000 +0200
+++ new/libopenmpt-0.2.8043-autotools/soundlib/Load_stm.cpp 2017-04-03 22:41:04.000000000 +0200
@@ -75,9 +75,9 @@
struct PACKED STMFileHeader
{
char songname[20];
- char trackername[8]; // !SCREAM! for ST 2.xx
- uint8 dosEof; // 0x1A
- uint8 filetype; // 1=song, 2=module (only 2 is supported, of course) :)
+ char trackername[8]; // !Scream! for ST 2.xx
+ uint8 dosEof; // 0x1A
+ uint8 filetype; // 1=song, 2=module (only 2 is supported, of course) :)
uint8 verMajor;
uint8 verMinor;
uint8 initTempo; // Ticks per row. Keep in mind that effects are only updated on every 16th tick.
@@ -119,12 +119,21 @@
{
file.Rewind();
+ // NOTE: Historically the magic byte check used to be case-insensitive.
+ // Other libraries (mikmod, xmp, Milkyplay) don't do this.
+ // ScreamTracker 2 and 3 do not care about the content of the magic bytes at all.
+ // After reviewing all STM files on ModLand and ModArchive, it was found that the
+ // case-insensitive comparison is most likely not necessary for any files in the wild.
STMFileHeader fileHeader;
if(!file.ReadStruct(fileHeader)
|| fileHeader.filetype != 2
- || fileHeader.dosEof != 0x1A
- || (mpt::CompareNoCaseAscii(fileHeader.trackername, "!SCREAM!", 8)
- && mpt::CompareNoCaseAscii(fileHeader.trackername, "BMOD2STM", 8))
+ || (fileHeader.dosEof != 0x1A && fileHeader.dosEof != 2) // ST2 ignores this, ST3 doesn't. putup10.stm / putup11.stm have dosEof = 2.
+ || fileHeader.verMajor != 2
+ || fileHeader.verMinor > 21 // ST3 only accepts 0, 10, 20 and 21
+ || fileHeader.globalVolume > 64
+ || (memcmp(fileHeader.trackername, "!Scream!", 8)
+ && memcmp(fileHeader.trackername, "BMOD2STM", 8)
+ && memcmp(fileHeader.trackername, "WUZAMOD!", 8))
|| !file.CanRead(31 * sizeof(STMSampleHeader) + 128))
{
return false;
@@ -138,7 +147,7 @@
mpt::String::Readmpt::String::maybeNullTerminated(m_songName, fileHeader.songname);
// Read STM header
- m_madeWithTracker = mpt::String::Print("Scream Tracker %1.%2", fileHeader.verMajor, mpt::fmt::hex0<2>(fileHeader.verMinor));
+ m_madeWithTracker = mpt::String::Print("Scream Tracker %1.%2", fileHeader.verMajor, mpt::fmt::dec0<2>(fileHeader.verMinor));
m_nSamples = 31;
m_nChannels = 4;
m_nMinPeriod = 64;
@@ -151,7 +160,7 @@
m_nDefaultSpeed = fileHeader.initTempo;
#endif // MODPLUG_TRACKER
if(m_nDefaultSpeed < 1) m_nDefaultSpeed = 1;
- m_nDefaultGlobalVolume = std::min<uint8>(fileHeader.globalVolume, 64) * 4;
+ m_nDefaultGlobalVolume = fileHeader.globalVolume * 4u;
// Setting up channels
for(CHANNELINDEX chn = 0; chn < 4; chn++)
@@ -166,6 +175,8 @@
{
STMSampleHeader sampleHeader;
file.ReadConvertEndianness(sampleHeader);
+ if(sampleHeader.zero != 0 && sampleHeader.zero != 46) // putup10.stm has zero = 46
+ return false;
sampleHeader.ConvertToMPT(Samples[smp]);
mpt::String::Readmpt::String::nullTerminated(m_szNames[smp], sampleHeader.filename);
sampleOffsets[smp - 1] = sampleHeader.offset;
@@ -175,10 +186,10 @@
Order.ReadAsByte(file, 128);
for(ORDERINDEX ord = 0; ord < 128; ord++)
{
- if(Order[ord] >= 99)
- {
+ if(Order[ord] == 99 || Order[ord] == 255) // 99 is regular, sometimes a single 255 entry can be found too
Order[ord] = Order.GetInvalidPatIndex();
- }
+ else if(Order[ord] > 99)
+ return false;
}
for(PATTERNINDEX pat = 0; pat < fileHeader.numPatterns; pat++)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/soundlib/ModSample.cpp new/libopenmpt-0.2.8043-autotools/soundlib/ModSample.cpp
--- old/libopenmpt-0.2.7774-autotools/soundlib/ModSample.cpp 2017-01-11 02:08:48.000000000 +0100
+++ new/libopenmpt-0.2.8043-autotools/soundlib/ModSample.cpp 2017-04-03 22:39:14.000000000 +0200
@@ -89,7 +89,10 @@
{
if(nVibRate != 0 && nVibDepth != 0)
{
- nVibSweep = 255 - nVibSweep;
+ if(nVibSweep != 0)
+ nVibSweep = mpt::saturate_cast<uint8>(Util::muldivr_unsigned(nVibDepth, 256, nVibSweep));
+ else
+ nVibSweep = 255;
}
}
// Convert incompatible autovibrato types
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/soundlib/ModSequence.cpp new/libopenmpt-0.2.8043-autotools/soundlib/ModSequence.cpp
--- old/libopenmpt-0.2.7774-autotools/soundlib/ModSequence.cpp 2016-08-03 16:13:49.000000000 +0200
+++ new/libopenmpt-0.2.8043-autotools/soundlib/ModSequence.cpp 2017-04-23 03:11:52.000000000 +0200
@@ -683,7 +683,7 @@
{
// Oops, some other sequence uses this pattern already.
const PATTERNINDEX newPat = m_sndFile.Patterns.InsertAny(m_sndFile.Patterns[nPat].GetNumRows(), true);
- if(newPat != SEQUENCEINDEX_INVALID)
+ if(newPat != PATTERNINDEX_INVALID)
{
// could create new pattern - copy data over and continue from here.
At(nFirstOrder + nOrd) = newPat;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/soundlib/SampleFormats.cpp new/libopenmpt-0.2.8043-autotools/soundlib/SampleFormats.cpp
--- old/libopenmpt-0.2.7774-autotools/soundlib/SampleFormats.cpp 2017-03-10 14:12:36.000000000 +0100
+++ new/libopenmpt-0.2.8043-autotools/soundlib/SampleFormats.cpp 2017-03-31 14:27:04.000000000 +0200
@@ -3353,7 +3353,7 @@
#if defined(MPT_WITH_MPG123)
#elif defined(MPT_ENABLE_MPG123_DYNBIND)
mpt::Library MSVCRT;
- mpt::Library LIBGCC;
+ mpt::Library SHLWAPI;
#endif // MPT_WITH_MPG123 || MPT_ENABLE_MPG123_DYNBIND
#endif // MPT_OS_WINDOWS
@@ -3479,18 +3479,15 @@
return false;
}
#endif // LIBOPENMPT_BUILD
- // preload libgcc_s_sjlj-1.dll for the same reasons (32bit only, 64bit libmpg123 does not require it)
- MPT_CONSTANT_IF(sizeof(void*) == 4)
- {
- if(!LIBGCC.IsValid()) LIBGCC = mpt::Library(mpt::LibraryPath::AppFullName(MPT_PATHSTRING("libgcc_s_sjlj-1")));
- #if defined(LIBOPENMPT_BUILD)
- // require successful dependency loading for libopenmpt
- if(!LIBGCC.IsValid())
- {
- return false;
- }
- #endif // LIBOPENMPT_BUILD
- }
+ // preload shlwapi.dll for the same reasons
+ if(!SHLWAPI.IsValid()) SHLWAPI = mpt::Library(mpt::LibraryPath::System(MPT_PATHSTRING("shlwapi")));
+ #if defined(LIBOPENMPT_BUILD)
+ // require successful dependency loading for libopenmpt
+ if(!SHLWAPI.IsValid())
+ {
+ return false;
+ }
+ #endif // LIBOPENMPT_BUILD
#endif // MPT_OS_WINDOWS
#if defined(MODPLUG_TRACKER)
AddLibrary("mpg123", mpt::LibraryPath::AppFullName(MPT_PATHSTRING("libmpg123-0")));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/soundlib/Snd_fx.cpp new/libopenmpt-0.2.8043-autotools/soundlib/Snd_fx.cpp
--- old/libopenmpt-0.2.7774-autotools/soundlib/Snd_fx.cpp 2017-03-10 01:23:21.000000000 +0100
+++ new/libopenmpt-0.2.8043-autotools/soundlib/Snd_fx.cpp 2017-03-15 15:05:44.000000000 +0100
@@ -531,7 +531,7 @@
positionJumpOnThisRow = true;
memory.state.m_nNextOrder = static_cast<ORDERINDEX>(CalculateXParam(memory.state.m_nPattern, memory.state.m_nRow, nChn));
memory.state.m_nNextPatStartRow = 0; // FT2 E60 bug
- // see http://forum.openmpt.org/index.php?topic=2769.0 - FastTracker resets Dxx if Bxx is called _after_ Dxx
+ // see https://forum.openmpt.org/index.php?topic=2769.0 - FastTracker resets Dxx if Bxx is called _after_ Dxx
// Test case: PatternJump.mod
if(!patternBreakOnThisRow || (GetType() & (MOD_TYPE_MOD | MOD_TYPE_XM)))
memory.state.m_nNextRow = 0;
@@ -3205,15 +3205,8 @@
case CMD_POSITIONJUMP:
m_PlayState.m_nNextPatStartRow = 0; // FT2 E60 bug
nPosJump = static_cast<ORDERINDEX>(CalculateXParam(m_PlayState.m_nPattern, m_PlayState.m_nRow, nChn));
- if(m_SongFlags[SONG_PATTERNLOOP] && m_PlayState.m_nSeqOverride == ORDERINDEX_INVALID)
- {
- m_PlayState.m_nSeqOverride = nPosJump;
- //Releasing pattern loop after position jump could cause
- //instant jumps - modifying behavior so that now position jumps
- //occurs also when pattern loop is enabled.
- }
- // see http://forum.openmpt.org/index.php?topic=2769.0 - FastTracker resets Dxx if Bxx is called _after_ Dxx
+ // see https://forum.openmpt.org/index.php?topic=2769.0 - FastTracker resets Dxx if Bxx is called _after_ Dxx
// Test case: PatternJump.mod
if((GetType() & (MOD_TYPE_MOD | MOD_TYPE_XM)) && nBreakRow != ROWINDEX_INVALID)
{
@@ -3341,8 +3334,9 @@
}
}
- m_PlayState.m_nNextOrder = nPosJump;
m_PlayState.m_nNextRow = nBreakRow;
+ if(!m_SongFlags[SONG_PATTERNLOOP])
+ m_PlayState.m_nNextOrder = nPosJump;
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/soundlib/Sndmix.cpp new/libopenmpt-0.2.8043-autotools/soundlib/Sndmix.cpp
--- old/libopenmpt-0.2.7774-autotools/soundlib/Sndmix.cpp 2016-11-12 19:23:44.000000000 +0100
+++ new/libopenmpt-0.2.8043-autotools/soundlib/Sndmix.cpp 2017-03-16 01:27:19.000000000 +0100
@@ -696,30 +696,32 @@
// IT compatibility: IT has its own, more precise tables
if(m_playBehaviour[kITVibratoTremoloPanbrello])
{
+ position &= 0xFF;
switch(type & 0x03)
{
- case 0:
+ case 0: // Sine
default:
return ITSinusTable[position];
- case 1:
- return ITRampDownTable[position];
- case 2:
+ case 1: // Ramp down
+ return 64 - (position + 1) / 2;
+ case 2: // Square
return position < 128 ? 64 : 0;
- case 3:
+ case 3: // Random
return mpt::random