Skip to content

Commit

Permalink
Updated libOpenMPT to version 0.7.11
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
  • Loading branch information
kode54 committed Oct 31, 2024
1 parent 9945480 commit d47e5b7
Show file tree
Hide file tree
Showing 60 changed files with 682 additions and 335 deletions.
14 changes: 13 additions & 1 deletion Frameworks/OpenMPT/OpenMPT/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
# ONLY_TEST=0 Only build the test suite.
# STRICT=0 Treat warnings as errors.
# MODERN=0 Pass more modern compiler options.
# ANCIENT=0 Pass compiler options compatible with older versions.
# NATIVE=0 Optimize for system CPU.
# STDCXX=c++17 C++ standard version (default depends on compiler)
# STDC=c17 C standard version (default depends on compiler)
Expand Down Expand Up @@ -975,6 +976,7 @@ endif

CPPCHECK_FLAGS += -j $(NUMTHREADS)
CPPCHECK_FLAGS += --std=c11 --std=c++17
CPPCHECK_FLAGS += --library=build/cppcheck/glibc-workarounds.cfg
CPPCHECK_FLAGS += --quiet
CPPCHECK_FLAGS += --enable=warning --inline-suppr --template='{file}:{line}: warning: {severity}: {message} [{id}]'
CPPCHECK_FLAGS += --check-level=exhaustive
Expand Down Expand Up @@ -1083,11 +1085,15 @@ CPPFLAGS += -DLIBOPENMPT_BUILD


COMMON_CXX_SOURCES += \
$(sort $(wildcard src/openmpt/all/*.cpp)) \
$(sort $(wildcard src/openmpt/base/*.cpp)) \
$(sort $(wildcard src/openmpt/logging/*.cpp)) \
$(sort $(wildcard src/openmpt/random/*.cpp)) \
$(sort $(wildcard common/*.cpp)) \
$(sort $(wildcard src/mpt/src/*.cpp)) \

SOUNDLIB_CXX_SOURCES += \
$(COMMON_CXX_SOURCES) \
$(sort $(wildcard src/openmpt/soundbase/*.cpp)) \
$(sort $(wildcard soundlib/*.cpp)) \
$(sort $(wildcard soundlib/plugins/*.cpp)) \
$(sort $(wildcard soundlib/plugins/dmo/*.cpp)) \
Expand Down Expand Up @@ -1731,6 +1737,7 @@ bin/$(FLAVOUR_DIR)dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION).msvc.zip: bin/$
svn export ./build/scriptlib bin/$(FLAVOUR_DIR)dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/build/scriptlib --native-eol CRLF
svn export ./build/svn_version bin/$(FLAVOUR_DIR)dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/build/svn_version --native-eol CRLF
svn export ./build/vs bin/$(FLAVOUR_DIR)dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/build/vs --native-eol CRLF
svn export ./build/vs2017winxpansi bin/$(FLAVOUR_DIR)dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/build/vs2017winxpansi --native-eol CRLF
svn export ./build/vs2017winxp bin/$(FLAVOUR_DIR)dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/build/vs2017winxp --native-eol CRLF
svn export ./build/vs2019win7 bin/$(FLAVOUR_DIR)dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/build/vs2019win7 --native-eol CRLF
svn export ./build/vs2019win81 bin/$(FLAVOUR_DIR)dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/build/vs2019win81 --native-eol CRLF
Expand Down Expand Up @@ -1866,6 +1873,11 @@ else
svn export ./include/miniz/miniz.c bin/$(FLAVOUR_DIR)dist-dos/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/LICENSES/MINIZ.TXT --native-eol CRLF
svn export ./include/stb_vorbis/stb_vorbis.c bin/$(FLAVOUR_DIR)dist-dos/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/LICENSES/STBVORB.TXT --native-eol CRLF
endif
mkdir -p bin/$(FLAVOUR_DIR)dist-dos/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/LICENSES/DJGPP
cp $(shell dirname $(shell which i386-pc-msdosdjgpp-gcc))/../license/copying bin/$(FLAVOUR_DIR)dist-dos/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/LICENSES/DJGPP/COPYING
cp $(shell dirname $(shell which i386-pc-msdosdjgpp-gcc))/../license/copying.dj bin/$(FLAVOUR_DIR)dist-dos/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/LICENSES/DJGPP/COPYING.DJ
cp $(shell dirname $(shell which i386-pc-msdosdjgpp-gcc))/../license/copying.lib bin/$(FLAVOUR_DIR)dist-dos/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/LICENSES/DJGPP/COPYING.LIB
cp $(shell dirname $(shell which i386-pc-msdosdjgpp-gcc))/../license/source.txt bin/$(FLAVOUR_DIR)dist-dos/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/LICENSES/DJGPP/SOURCE.TXT
mkdir -p bin/$(FLAVOUR_DIR)dist-dos/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/SRC
cp build/externals/csdpmi7s.zip bin/$(FLAVOUR_DIR)dist-dos/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/SRC/CSDPMI7S.ZIP
mkdir -p bin/$(FLAVOUR_DIR)dist-dos/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/BIN
Expand Down
39 changes: 38 additions & 1 deletion Frameworks/OpenMPT/OpenMPT/build/android_ndk/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,45 @@ include $(CLEAR_VARS)

LOCAL_MODULE := openmpt

ifeq ($(NDK_MAJOR),)
LOCAL_CFLAGS += -std=c17
LOCAL_CPPFLAGS += -std=c++17 -fexceptions -frtti
LOCAL_CPPFLAGS += -std=c++17
else
ifeq ($(NDK_MAJOR),21)
# clang 9
LOCAL_CFLAGS += -std=c17
LOCAL_CPPFLAGS += -std=c++17
else ifeq ($(NDK_MAJOR),22)
# clang 11
LOCAL_CFLAGS += -std=c17
LOCAL_CPPFLAGS += -std=c++20
else ifeq ($(NDK_MAJOR),23)
# clang 12
LOCAL_CFLAGS += -std=c17
LOCAL_CPPFLAGS += -std=c++20
else ifeq ($(NDK_MAJOR),24)
# clang 14
LOCAL_CFLAGS += -std=c17
LOCAL_CPPFLAGS += -std=c++20
else ifeq ($(NDK_MAJOR),25)
# clang 14
LOCAL_CFLAGS += -std=c17
LOCAL_CPPFLAGS += -std=c++20
else ifeq ($(NDK_MAJOR),26)
# clang 17
LOCAL_CFLAGS += -std=c17
LOCAL_CPPFLAGS += -std=c++20
else ifeq ($(NDK_MAJOR),27)
# clang 18
LOCAL_CFLAGS += -std=c17
LOCAL_CPPFLAGS += -std=c++20
else
LOCAL_CFLAGS += -std=c17
LOCAL_CPPFLAGS += -std=c++20
endif
endif

LOCAL_CPPFLAGS += -fexceptions -frtti

LOCAL_CPP_FEATURES += exceptions rtti

Expand Down
36 changes: 36 additions & 0 deletions Frameworks/OpenMPT/OpenMPT/build/android_ndk/Application.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,42 @@

ifeq ($(NDK_MAJOR),)
APP_CFLAGS := -std=c17
APP_CPPFLAGS := -std=c++17 -fexceptions -frtti
else
ifeq ($(NDK_MAJOR),21)
# clang 9
APP_CFLAGS := -std=c17
APP_CPPFLAGS := -std=c++17 -fexceptions -frtti
else ifeq ($(NDK_MAJOR),22)
# clang 11
APP_CFLAGS := -std=c17
APP_CPPFLAGS := -std=c++20 -fexceptions -frtti
else ifeq ($(NDK_MAJOR),23)
# clang 12
APP_CFLAGS := -std=c17
APP_CPPFLAGS := -std=c++20 -fexceptions -frtti
else ifeq ($(NDK_MAJOR),24)
# clang 14
APP_CFLAGS := -std=c17
APP_CPPFLAGS := -std=c++20 -fexceptions -frtti
else ifeq ($(NDK_MAJOR),25)
# clang 14
APP_CFLAGS := -std=c17
APP_CPPFLAGS := -std=c++20 -fexceptions -frtti
else ifeq ($(NDK_MAJOR),26)
# clang 17
APP_CFLAGS := -std=c17
APP_CPPFLAGS := -std=c++20 -fexceptions -frtti
else ifeq ($(NDK_MAJOR),27)
# clang 18
APP_CFLAGS := -std=c17
APP_CPPFLAGS := -std=c++20 -fexceptions -frtti
else
APP_CFLAGS := -std=c17
APP_CPPFLAGS := -std=c++20 -fexceptions -frtti
endif
endif

APP_LDFLAGS :=
APP_STL := c++_shared

Expand Down
6 changes: 3 additions & 3 deletions Frameworks/OpenMPT/OpenMPT/build/dist.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

MPT_SVNVERSION=21223
MPT_SVNURL=https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.7.9
MPT_SVNDATE=2024-07-21T12:01:13.335584Z
MPT_SVNVERSION=21953
MPT_SVNURL=https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.7.11
MPT_SVNDATE=2024-10-26T13:09:27.804941Z
4 changes: 2 additions & 2 deletions Frameworks/OpenMPT/OpenMPT/build/make/config-emscripten.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

ifeq ($(origin CC),default)
CC = emcc -c
CC = emcc
endif
ifeq ($(origin CXX),default)
CXX = em++ -c
CXX = em++
endif
ifeq ($(origin LD),default)
LD = em++
Expand Down
13 changes: 11 additions & 2 deletions Frameworks/OpenMPT/OpenMPT/build/make/warnings-clang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
CXXFLAGS_WARNINGS += -Wcast-align -Wcast-qual -Wdouble-promotion -Wfloat-conversion -Wmissing-prototypes -Wshift-count-negative -Wshift-count-overflow -Wshift-op-parentheses -Wshift-overflow -Wshift-sign-overflow -Wundef
CFLAGS_WARNINGS += -Wcast-align -Wcast-qual -Wdouble-promotion -Wfloat-conversion -Wmissing-prototypes -Wshift-count-negative -Wshift-count-overflow -Wshift-op-parentheses -Wshift-overflow -Wshift-sign-overflow -Wundef

CXXFLAGS_WARNINGS += -Wdeprecated -Wextra-semi -Wframe-larger-than=16000 -Wglobal-constructors -Wimplicit-fallthrough -Wmissing-declarations -Wnon-virtual-dtor -Wreserved-id-macro
CFLAGS_WARNINGS += -Wframe-larger-than=4000
CXXFLAGS_WARNINGS += -Wdeprecated -Wextra-semi -Wglobal-constructors -Wimplicit-fallthrough -Wmissing-declarations -Wnon-virtual-dtor -Wreserved-id-macro
CFLAGS_WARNINGS +=

ifneq ($(ANCIENT),1)
CXXFLAGS_WARNINGS += -Wframe-larger-than=16000
CFLAGS_WARNINGS += -Wframe-larger-than=4000
endif

#CXXFLAGS_WARNINGS += -Wfloat-equal
#CXXFLAGS_WARNINGS += -Wdocumentation
Expand All @@ -21,10 +26,14 @@ CFLAGS_SILENT += -Wno-cast-align
CFLAGS_SILENT += -Wno-cast-qual
CFLAGS_SILENT += -Wno-double-promotion
CFLAGS_SILENT += -Wno-float-conversion
ifneq ($(ANCIENT),1)
CFLAGS_SILENT += -Wno-frame-larger-than
endif
CFLAGS_SILENT += -Wno-missing-prototypes
CFLAGS_SILENT += -Wno-sign-compare
ifneq ($(ANCIENT),1)
CFLAGS_SILENT += -Wno-unused-but-set-variable
endif
CFLAGS_SILENT += -Wno-unused-function
CFLAGS_SILENT += -Wno-unused-parameter
CFLAGS_SILENT += -Wno-unused-variable
Expand Down
8 changes: 4 additions & 4 deletions Frameworks/OpenMPT/OpenMPT/build/svn_version/svn_version.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

#pragma once
#define OPENMPT_VERSION_SVNVERSION "21223"
#define OPENMPT_VERSION_REVISION 21223
#define OPENMPT_VERSION_SVNVERSION "21953"
#define OPENMPT_VERSION_REVISION 21953
#define OPENMPT_VERSION_DIRTY 0
#define OPENMPT_VERSION_MIXEDREVISIONS 0
#define OPENMPT_VERSION_URL "https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.7.9"
#define OPENMPT_VERSION_DATE "2024-07-21T12:01:13.335584Z"
#define OPENMPT_VERSION_URL "https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.7.11"
#define OPENMPT_VERSION_DATE "2024-10-26T13:09:27.804941Z"
#define OPENMPT_VERSION_IS_PACKAGE 1

5 changes: 3 additions & 2 deletions Frameworks/OpenMPT/OpenMPT/common/BuildSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@



#include "mpt/base/detect_arch.hpp"
#include "mpt/base/detect_compiler.hpp"
#include "mpt/base/detect_os.hpp"
#include "mpt/base/detect_quirks.hpp"
Expand Down Expand Up @@ -229,14 +230,14 @@
#endif

#if defined(MPT_ENABLE_ARCH_INTRINSICS)
#if MPT_COMPILER_MSVC && defined(_M_IX86)
#if MPT_COMPILER_MSVC && MPT_ARCH_X86

#define MPT_ENABLE_ARCH_X86

#define MPT_ENABLE_ARCH_INTRINSICS_SSE
#define MPT_ENABLE_ARCH_INTRINSICS_SSE2

#elif MPT_COMPILER_MSVC && defined(_M_X64)
#elif MPT_COMPILER_MSVC && MPT_ARCH_AMD64

#define MPT_ENABLE_ARCH_AMD64

Expand Down
6 changes: 4 additions & 2 deletions Frameworks/OpenMPT/OpenMPT/common/mptBaseUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include "mpt/base/array.hpp"
#include "mpt/base/bit.hpp"
#include "mpt/base/constexpr_throw.hpp"
#include "mpt/base/detect_arch.hpp"
#include "mpt/base/detect_compiler.hpp"
#include "mpt/base/math.hpp"
#include "mpt/base/memory.hpp"
#include "mpt/base/numeric.hpp"
Expand Down Expand Up @@ -115,7 +117,7 @@ namespace Util {
// MSVC generates unnecessarily complicated code for the unoptimized variant using _allmul.
MPT_CONSTEXPR20_FUN int64 mul32to64(int32 a, int32 b)
{
#if MPT_COMPILER_MSVC && (defined(_M_IX86) || defined(_M_X64))
#if MPT_COMPILER_MSVC && (MPT_ARCH_X86 || MPT_ARCH_AMD64)
MPT_MAYBE_CONSTANT_IF(MPT_IS_CONSTANT_EVALUATED20())
{
return static_cast<int64>(a) * b;
Expand All @@ -130,7 +132,7 @@ namespace Util {

MPT_CONSTEXPR20_FUN uint64 mul32to64_unsigned(uint32 a, uint32 b)
{
#if MPT_COMPILER_MSVC && (defined(_M_IX86) || defined(_M_X64))
#if MPT_COMPILER_MSVC && (MPT_ARCH_X86 || MPT_ARCH_AMD64)
MPT_MAYBE_CONSTANT_IF(MPT_IS_CONSTANT_EVALUATED20())
{
return static_cast<uint64>(a) * b;
Expand Down
2 changes: 2 additions & 0 deletions Frameworks/OpenMPT/OpenMPT/common/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,11 @@ mpt::ustring GetFullCreditsString()
"\n"
"Additional contributors:\n"
"coda (https://coda.s3m.us/)\n"
"cs127 (https://cs127.github.io/)\n"
"Jo\xC3\xA3o Baptista de Paula e Silva (https://joaobapt.com/)\n"
"kode54 (https://kode54.net/)\n"
"Revenant (https://revenant1.net/)\n"
"SYRiNX\n"
"xaimus (http://xaimus.com/)\n"
"\n"
"Thanks to:\n"
Expand Down
2 changes: 1 addition & 1 deletion Frameworks/OpenMPT/OpenMPT/common/versionNumber.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ OPENMPT_NAMESPACE_BEGIN
// Version definitions. The only thing that needs to be changed when changing version number.
#define VER_MAJORMAJOR 1
#define VER_MAJOR 31
#define VER_MINOR 09
#define VER_MINOR 11
#define VER_MINORMINOR 00

OPENMPT_NAMESPACE_END
10 changes: 8 additions & 2 deletions Frameworks/OpenMPT/OpenMPT/include/minimp3/OpenMPT.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
minimp3 library from https://github.com/lieff/minimp3
commit 50d2aaf360a53653b718fead8e258d654c3a7e41 (2021-11-27)
Fork https://github.com/manxorist/minimp3/releases/tag/openmpt-2024-08-15-v4
commit 2116754771b79347ad2f39127abace2a093c383e (2024-08-15)
The following changes have been made:
* minimp3.c has been added
* some warnings have been fixed
* The following pull rquests have been merged:
* https://github.com/lieff/minimp3/pull/126
* https://github.com/lieff/minimp3/pull/96
* https://github.com/lieff/minimp3/pull/97
* https://github.com/lieff/minimp3/pull/125
* https://github.com/lieff/minimp3/pull/127
* all modifications are marked by /* OpenMPT */
Loading

0 comments on commit d47e5b7

Please sign in to comment.