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 - tchva...@suse.com + +- Add patch fixing issue bsc#1040149 wrong includedir propagation: + * libmodpulg-pcfile.patch + +------------------------------------------------------------------- +Mon May 22 12:32:32 UTC 2017 - tchva...@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::Read<mpt::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::Read<mpt::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<int, 7>(AccessPRNG()) - 0x40; } } else { + position &= 0x3F; switch(type & 0x03) { - case 0: + case 0: // Sine default: return ModSinusTable[position]; - case 1: - return ModRampDownTable[position]; - case 2: + case 1: // Ramp down + return (position < 32 ? 0 : 255) - position * 4; + case 2: // Square return position < 32 ? 127 : -127; - case 3: + case 3: // Random return ModRandomTable[position]; } } @@ -1558,7 +1560,6 @@ return; } - // IT compatibility: IT has its own, more precise tables if(m_playBehaviour[kITVibratoTremoloPanbrello]) chn.nVibratoPos = (vibpos + 4 * chn.nVibratoSpeed) & 0xFF; @@ -1625,10 +1626,10 @@ vdelta = mpt::random<int, 7>(AccessPRNG()) - 0x40; break; case VIB_RAMP_DOWN: - vdelta = ITRampDownTable[vibpos]; + vdelta = 64 - (vibpos + 1) / 2; break; case VIB_RAMP_UP: - vdelta = -ITRampDownTable[vibpos]; + vdelta = ((vibpos + 1) / 2) - 64; break; case VIB_SQUARE: vdelta = vibpos < 128 ? 64 : 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/soundlib/Tables.cpp new/libopenmpt-0.2.8043-autotools/soundlib/Tables.cpp --- old/libopenmpt-0.2.7774-autotools/soundlib/Tables.cpp 2016-07-17 17:12:51.000000000 +0200 +++ new/libopenmpt-0.2.8043-autotools/soundlib/Tables.cpp 2017-03-16 01:27:19.000000000 +0100 @@ -388,15 +388,6 @@ -127,-126,-125,-122,-117,-112,-106,-98,-90,-81,-71,-60,-49,-37,-25,-12 }; -// Triangle wave table (ramp down) -const int8 ModRampDownTable[64] = -{ - 0,-4,-8,-12,-16,-20,-24,-28,-32,-36,-40,-44,-48,-52,-56,-60, - -64,-68,-72,-76,-80,-84,-88,-92,-96,-100,-104,-108,-112,-116,-120,-124, - 127,123,119,115,111,107,103,99,95,91,87,83,79,75,71,67, - 63,59,55,51,47,43,39,35,31,27,23,19,15,11,7,3 -}; - // Random wave table const int8 ModRandomTable[64] = { @@ -406,9 +397,7 @@ 42,-34,89,-4,-51,-72,21,-29,112,123,84,-101,-92,98,-54,-95 }; -// Impulse Tracker tables (ITTECH.TXT) - -// Sinus table +// Impulse Tracker sinus table (ITTECH.TXT) const int8 ITSinusTable[256] = { 0, 2, 3, 5, 6, 8, 9, 11, 12, 14, 16, 17, 19, 20, 22, 23, @@ -429,27 +418,6 @@ -24,-23,-22,-20,-19,-17,-16,-14,-12,-11, -9, -8, -6, -5, -3, -2, }; -// Triangle wave table (ramp down) -const int8 ITRampDownTable[256] = -{ - 64, 63, 63, 62, 62, 61, 61, 60, 60, 59, 59, 58, 58, 57, 57, 56, - 56, 55, 55, 54, 54, 53, 53, 52, 52, 51, 51, 50, 50, 49, 49, 48, - 48, 47, 47, 46, 46, 45, 45, 44, 44, 43, 43, 42, 42, 41, 41, 40, - 40, 39, 39, 38, 38, 37, 37, 36, 36, 35, 35, 34, 34, 33, 33, 32, - 32, 31, 31, 30, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, - 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, - 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, - 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, - 0, -1, -1, -2, -2, -3, -3, -4, -4, -5, -5, -6, -6, -7, -7, -8, - -8, -9, -9,-10,-10,-11,-11,-12,-12,-13,-13,-14,-14,-15,-15,-16, - -16,-17,-17,-18,-18,-19,-19,-20,-20,-21,-21,-22,-22,-23,-23,-24, - -24,-25,-25,-26,-26,-27,-27,-28,-28,-29,-29,-30,-30,-31,-31,-32, - -32,-33,-33,-34,-34,-35,-35,-36,-36,-37,-37,-38,-38,-39,-39,-40, - -40,-41,-41,-42,-42,-43,-43,-44,-44,-45,-45,-46,-46,-47,-47,-48, - -48,-49,-49,-50,-50,-51,-51,-52,-52,-53,-53,-54,-54,-55,-55,-56, - -56,-57,-57,-58,-58,-59,-59,-60,-60,-61,-61,-62,-62,-63,-63,-64, -}; - // volume fade tables for Retrig Note: const int8 retrigTable1[16] = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/soundlib/Tables.h new/libopenmpt-0.2.8043-autotools/soundlib/Tables.h --- old/libopenmpt-0.2.7774-autotools/soundlib/Tables.h 2015-11-07 03:40:09.000000000 +0100 +++ new/libopenmpt-0.2.8043-autotools/soundlib/Tables.h 2017-03-16 01:27:19.000000000 +0100 @@ -23,10 +23,8 @@ extern const uint16 FreqS3MTable[16]; extern const uint16 S3MFineTuneTable[16]; extern const int8 ModSinusTable[64]; -extern const int8 ModRampDownTable[64]; extern const int8 ModRandomTable[64]; extern const int8 ITSinusTable[256]; -extern const int8 ITRampDownTable[256]; extern const int8 retrigTable1[16]; extern const int8 retrigTable2[16]; extern const uint16 XMPeriodTable[104]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/soundlib/plugins/PluginManager.cpp new/libopenmpt-0.2.8043-autotools/soundlib/plugins/PluginManager.cpp --- old/libopenmpt-0.2.7774-autotools/soundlib/plugins/PluginManager.cpp 2016-07-31 17:59:59.000000000 +0200 +++ new/libopenmpt-0.2.8043-autotools/soundlib/plugins/PluginManager.cpp 2017-04-14 16:27:04.000000000 +0200 @@ -146,7 +146,12 @@ #endif // DirectX Media Objects - EnumerateDirectXDMOs(); + #ifdef MODPLUG_TRACKER + EnumerateDirectXDMOs(true); + #else // !MODPLUG_TRACKER + // For security reasons, we only load known DMO plugins in libopenmpt. + EnumerateDirectXDMOs(false); + #endif // MODPLUG_TRACKER // Hard-coded "plugins" VSTPluginLib *plug; @@ -264,10 +269,38 @@ } -void CVstPluginManager::EnumerateDirectXDMOs() -//-------------------------------------------- -{ #ifndef NO_DMO + +static GUID make_GUID(uint32 d1, uint16 d2, uint16 d3, uint8 d41, uint8 d42, uint8 d43, uint8 d44, uint8 d45, uint8 d46, uint8 d47, uint8 d48) +{ + GUID guid = { d1, d2, d3, d41, d42, d43, d44, d45, d46, d47, d48 }; + return guid; +} + +static bool IsKnownDMO(const CLSID &clsid) +//---------------------------------------- +{ + if(IsEqualGUID(clsid, make_GUID(0xEFE6629C, 0x81F7, 0x4281u, 0xBD, 0x91, 0xC9, 0xD6, 0x04, 0xA9, 0x5A, 0xF6))) return true; // Chorus + if(IsEqualGUID(clsid, make_GUID(0xEF011F79, 0x4000, 0x406Du, 0x87, 0xAF, 0xBF, 0xFB, 0x3F, 0xC3, 0x9D, 0x57))) return true; // Compressor + if(IsEqualGUID(clsid, make_GUID(0xEF114C90, 0xCD1D, 0x484Eu, 0x96, 0xE5, 0x09, 0xCF, 0xAF, 0x91, 0x2A, 0x21))) return true; // Distortion + if(IsEqualGUID(clsid, make_GUID(0xEF3E932C, 0xD40B, 0x4F51u, 0x8C, 0xCF, 0x3F, 0x98, 0xF1, 0xB2, 0x9D, 0x5D))) return true; // Echo + if(IsEqualGUID(clsid, make_GUID(0xEFCA3D92, 0xDFD8, 0x4672u, 0xA6, 0x03, 0x74, 0x20, 0x89, 0x4B, 0xAD, 0x98))) return true; // Flanger + if(IsEqualGUID(clsid, make_GUID(0xDAFD8210, 0x5711, 0x4B91u, 0x9F, 0xE3, 0xF7, 0x5B, 0x7A, 0xE2, 0x79, 0xBF))) return true; // Gargle + if(IsEqualGUID(clsid, make_GUID(0xEF985E71, 0xD5C7, 0x42D4u, 0xBA, 0x4D, 0x2D, 0x07, 0x3E, 0x2E, 0x96, 0xF4))) return true; // I3DL2Reverb + if(IsEqualGUID(clsid, make_GUID(0x120CED89, 0x3BF4, 0x4173u, 0xA1, 0x32, 0x3C, 0xB4, 0x06, 0xCF, 0x32, 0x31))) return true; // ParamEq + if(IsEqualGUID(clsid, make_GUID(0x87FC0268, 0x9A55, 0x4360u, 0x95, 0xAA, 0x00, 0x4A, 0x1D, 0x9D, 0xE2, 0x6C))) return true; // WavesReverb + return false; +} + +#endif // !NO_DMO + + +void CVstPluginManager::EnumerateDirectXDMOs(bool loadDMOSystemUnknown) +//--------------------------------------------------------------------- +{ +#ifdef NO_DMO + MPT_UNREFERENCED_PARAMETER(loadDMOSystemUnknown); +#else HKEY hkEnum; WCHAR keyname[128]; @@ -281,31 +314,34 @@ std::wstring formattedKey = std::wstring(L"{") + std::wstring(keyname) + std::wstring(L"}"); if(Util::VerifyStringToCLSID(formattedKey, clsid)) { - HKEY hksub; - formattedKey = std::wstring(L"software\\classes\\DirectShow\\MediaObjects\\") + std::wstring(keyname); - if (RegOpenKeyW(HKEY_LOCAL_MACHINE, formattedKey.c_str(), &hksub) == ERROR_SUCCESS) + if(loadDMOSystemUnknown || IsKnownDMO(clsid)) { - WCHAR name[64]; - DWORD datatype = REG_SZ; - DWORD datasize = sizeof(name); - - if(ERROR_SUCCESS == RegQueryValueExW(hksub, nullptr, 0, &datatype, (LPBYTE)name, &datasize)) + HKEY hksub; + formattedKey = std::wstring(L"software\\classes\\DirectShow\\MediaObjects\\") + std::wstring(keyname); + if (RegOpenKeyW(HKEY_LOCAL_MACHINE, formattedKey.c_str(), &hksub) == ERROR_SUCCESS) { - mpt::String::SetNullTerminator(name); + WCHAR name[64]; + DWORD datatype = REG_SZ; + DWORD datasize = sizeof(name); - VSTPluginLib *plug = new (std::nothrow) VSTPluginLib(DMOPlugin::Create, true, mpt::PathString::FromNative(Util::GUIDToString(clsid)), mpt::PathString::FromNative(name)); - if(plug != nullptr) + if(ERROR_SUCCESS == RegQueryValueExW(hksub, nullptr, 0, &datatype, (LPBYTE)name, &datasize)) { - pluginList.push_back(plug); - plug->pluginId1 = kDmoMagic; - plug->pluginId2 = clsid.Data1; - plug->category = VSTPluginLib::catDMO; + mpt::String::SetNullTerminator(name); + + VSTPluginLib *plug = new (std::nothrow) VSTPluginLib(DMOPlugin::Create, true, mpt::PathString::FromNative(Util::GUIDToString(clsid)), mpt::PathString::FromNative(name)); + if(plug != nullptr) + { + pluginList.push_back(plug); + plug->pluginId1 = kDmoMagic; + plug->pluginId2 = clsid.Data1; + plug->category = VSTPluginLib::catDMO; #ifdef DMO_LOG - Log(mpt::String::Print(L"Found \"%1\" clsid=%2\n", plug->libraryName, plug->dllPath)); + Log(mpt::String::Print(L"Found \"%1\" clsid=%2\n", plug->libraryName, plug->dllPath)); #endif + } } + RegCloseKey(hksub); } - RegCloseKey(hksub); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/soundlib/plugins/PluginManager.h new/libopenmpt-0.2.8043-autotools/soundlib/plugins/PluginManager.h --- old/libopenmpt-0.2.7774-autotools/soundlib/plugins/PluginManager.h 2016-04-29 03:11:37.000000000 +0200 +++ new/libopenmpt-0.2.8043-autotools/soundlib/plugins/PluginManager.h 2017-04-14 16:27:04.000000000 +0200 @@ -160,7 +160,7 @@ static void ReportPlugException(const std::string &msg); protected: - void EnumerateDirectXDMOs(); + void EnumerateDirectXDMOs(bool loadDMOSystemUnknown); #else // NO_PLUGINS public: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libopenmpt-0.2.7774-autotools/test/test.cpp new/libopenmpt-0.2.8043-autotools/test/test.cpp --- old/libopenmpt-0.2.7774-autotools/test/test.cpp 2017-03-10 13:26:01.000000000 +0100 +++ new/libopenmpt-0.2.8043-autotools/test/test.cpp 2017-03-11 18:52:19.000000000 +0100 @@ -1211,10 +1211,10 @@ #endif + // Path splitting -#ifdef MODPLUG_TRACKER -#if MPT_OS_WINDOWS +#if MPT_OS_WINDOWS && defined(MPT_ENABLE_DYNBIND) VERIFY_EQUAL(MPT_PATHSTRING("").GetDrive(), MPT_PATHSTRING("")); VERIFY_EQUAL(MPT_PATHSTRING("").GetDir(), MPT_PATHSTRING("")); @@ -1316,9 +1316,6 @@ VERIFY_EQUAL(MPT_PATHSTRING("\\\\?\\UNC\\server\\share\\dir1\\dir2\\name.foo.ext").GetFileName(), MPT_PATHSTRING("name.foo")); VERIFY_EQUAL(MPT_PATHSTRING("\\\\?\\UNC\\server\\share\\dir1\\dir2\\name.foo.ext").GetFileExt(), MPT_PATHSTRING(".ext")); VERIFY_EQUAL(MPT_PATHSTRING("\\\\?\\UNC\\server\\share\\dir1\\dir2\\name.foo.ext").GetFullFileName(), MPT_PATHSTRING("name.foo.ext")); - -#endif - #endif