Update internal MUNT to version 2.7.0

This commit is contained in:
Alexander Babikov
2022-07-24 07:50:54 +05:00
parent 1bc4ae5337
commit be8784b17c
87 changed files with 3292 additions and 994 deletions

View File

@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
* Copyright (C) 2011-2017 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
* Copyright (C) 2011-2022 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -20,27 +20,35 @@
#include "config.h"
/* Support for compiling shared library. */
/* Support for compiling shared library.
* MT32EMU_SHARED and mt32emu_EXPORTS are defined when building a shared library.
* MT32EMU_SHARED should also be defined for Windows platforms that provides for a small performance benefit,
* and it _must_ be defined along with MT32EMU_RUNTIME_VERSION_CHECK when using MSVC.
*/
#ifdef MT32EMU_SHARED
#if defined _WIN32 || defined __CYGWIN__
#ifdef _MSC_VER
#ifdef mt32emu_EXPORTS
#define MT32EMU_EXPORT_ATTRIBUTE _declspec(dllexport)
#else /* #ifdef mt32emu_EXPORTS */
#define MT32EMU_EXPORT_ATTRIBUTE _declspec(dllimport)
#endif /* #ifdef mt32emu_EXPORTS */
#else /* #ifdef _MSC_VER */
#ifdef mt32emu_EXPORTS
#define MT32EMU_EXPORT_ATTRIBUTE __attribute__ ((dllexport))
#else /* #ifdef mt32emu_EXPORTS */
#define MT32EMU_EXPORT_ATTRIBUTE __attribute__ ((dllimport))
#endif /* #ifdef mt32emu_EXPORTS */
#endif /* #ifdef _MSC_VER */
#else /* #if defined _WIN32 || defined __CYGWIN__ */
#define MT32EMU_EXPORT_ATTRIBUTE __attribute__ ((visibility("default")))
#endif /* #if defined _WIN32 || defined __CYGWIN__ */
# if defined _WIN32 || defined __CYGWIN__ || defined __OS2__
# ifdef _MSC_VER
# ifdef mt32emu_EXPORTS
# define MT32EMU_EXPORT_ATTRIBUTE _declspec(dllexport)
# else /* #ifdef mt32emu_EXPORTS */
# define MT32EMU_EXPORT_ATTRIBUTE _declspec(dllimport)
# endif /* #ifdef mt32emu_EXPORTS */
# else /* #ifdef _MSC_VER */
# ifdef mt32emu_EXPORTS
# define MT32EMU_EXPORT_ATTRIBUTE __attribute__ ((dllexport))
# else /* #ifdef mt32emu_EXPORTS */
# define MT32EMU_EXPORT_ATTRIBUTE __attribute__ ((dllimport))
# endif /* #ifdef mt32emu_EXPORTS */
# endif /* #ifdef _MSC_VER */
# else /* #if defined _WIN32 || defined __CYGWIN__ || defined __OS2__ */
# ifdef mt32emu_EXPORTS
# define MT32EMU_EXPORT_ATTRIBUTE __attribute__ ((visibility("default")))
# else /* #ifdef mt32emu_EXPORTS */
# define MT32EMU_EXPORT_ATTRIBUTE
# endif /* #ifdef mt32emu_EXPORTS */
# endif /* #if defined _WIN32 || defined __CYGWIN__ || defined __OS2__ */
#else /* #ifdef MT32EMU_SHARED */
#define MT32EMU_EXPORT_ATTRIBUTE
# define MT32EMU_EXPORT_ATTRIBUTE
#endif /* #ifdef MT32EMU_SHARED */
#if MT32EMU_EXPORTS_TYPE == 1 || MT32EMU_EXPORTS_TYPE == 2
@@ -49,6 +57,33 @@
#define MT32EMU_EXPORT MT32EMU_EXPORT_ATTRIBUTE
#endif
/* Facilitates easier tracking of the library version when an external symbol was introduced.
* Particularly useful for shared library builds on POSIX systems that support symbol versioning,
* so that the version map file can be generated automatically.
*/
#define MT32EMU_EXPORT_V(symbol_version_tag) MT32EMU_EXPORT
/* Helpers for compile-time version checks */
/* Encodes the given version components to a single integer value to simplify further checks. */
#define MT32EMU_VERSION_INT(major, minor, patch) ((major << 16) | (minor << 8) | patch)
/* The version of this library build, as an integer. */
#define MT32EMU_CURRENT_VERSION_INT MT32EMU_VERSION_INT(MT32EMU_VERSION_MAJOR, MT32EMU_VERSION_MINOR, MT32EMU_VERSION_PATCH)
/* Compares the current library version with the given version components. Intended for feature checks. */
#define MT32EMU_VERSION_ATLEAST(major, minor, patch) (MT32EMU_CURRENT_VERSION_INT >= MT32EMU_VERSION_INT(major, minor, patch))
/* Implements a simple version check that ensures full API compatibility of this library build
* with the application requirements. The latter can be derived from the versions of used public symbols.
*
* Note: This macro is intended for a quick compile-time check. To ensure compatibility of an application
* linked with a shared library, an automatic version check can be engaged with help of the build option
* libmt32emu_WITH_VERSION_TAGGING. For a fine-grained feature checking in run-time, see functions
* mt32emu_get_library_version_int and Synth::getLibraryVersionInt.
*/
#define MT32EMU_IS_COMPATIBLE(major, minor) (MT32EMU_VERSION_MAJOR == major && MT32EMU_VERSION_MINOR >= minor)
/* Useful constants */
/* Sample rate to use in mixing. With the progress of development, we've found way too many thing dependent.