update modplug to 0.8.9.0

This commit is contained in:
alexey.lysiuk 2020-12-16 11:01:10 +02:00
parent c63f067e3e
commit 3f8b6710ab
4 changed files with 40 additions and 35 deletions

View file

@ -19,9 +19,8 @@ extern "C" {
# else # else
# define MODPLUG_EXPORT __declspec(dllimport) /* using libmodplug dll for windows */ # define MODPLUG_EXPORT __declspec(dllimport) /* using libmodplug dll for windows */
# endif # endif
/* FIXME: USE VISIBILITY ATTRIBUTES HERE */ #elif defined(MODPLUG_BUILD) && defined(SYM_VISIBILITY)
#elif defined(MODPLUG_BUILD) # define MODPLUG_EXPORT __attribute__((visibility("default")))
#define MODPLUG_EXPORT
#else #else
#define MODPLUG_EXPORT #define MODPLUG_EXPORT
#endif #endif
@ -106,7 +105,7 @@ typedef struct _ModPlug_Settings
int mSurroundDepth; /* Surround level 0(quiet)-100(heavy) */ int mSurroundDepth; /* Surround level 0(quiet)-100(heavy) */
int mSurroundDelay; /* Surround delay in ms, usually 5-40ms */ int mSurroundDelay; /* Surround delay in ms, usually 5-40ms */
int mLoopCount; /* Number of times to loop. Zero prevents looping. int mLoopCount; /* Number of times to loop. Zero prevents looping.
-1 loops forever. */ * -1 loops forever. */
} ModPlug_Settings; } ModPlug_Settings;
/* Get and set the mod decoder settings. All options, except for channels, bits-per-sample, /* Get and set the mod decoder settings. All options, except for channels, bits-per-sample,
@ -131,7 +130,7 @@ MODPLUG_EXPORT void ModPlug_SeekOrder(ModPlugFile* file,int order);
MODPLUG_EXPORT int ModPlug_GetModuleType(ModPlugFile* file); MODPLUG_EXPORT int ModPlug_GetModuleType(ModPlugFile* file);
MODPLUG_EXPORT char* ModPlug_GetMessage(ModPlugFile* file); MODPLUG_EXPORT char* ModPlug_GetMessage(ModPlugFile* file);
#define MODPLUG_NO_FILESAVE /* experimental yet. must match stdafx.h. */
#ifndef MODPLUG_NO_FILESAVE #ifndef MODPLUG_NO_FILESAVE
/* /*
* EXPERIMENTAL Export Functions * EXPERIMENTAL Export Functions
@ -147,7 +146,7 @@ MODPLUG_EXPORT char ModPlug_ExportMOD(ModPlugFile* file, const char* filepath);
/*Export to a Impulse Tracker IT file. Should work OK in Little-Endian & Big-Endian platforms :-) */ /*Export to a Impulse Tracker IT file. Should work OK in Little-Endian & Big-Endian platforms :-) */
MODPLUG_EXPORT char ModPlug_ExportIT(ModPlugFile* file, const char* filepath); MODPLUG_EXPORT char ModPlug_ExportIT(ModPlugFile* file, const char* filepath);
#endif // MODPLUG_NO_FILESAVE #endif /* MODPLUG_NO_FILESAVE */
MODPLUG_EXPORT unsigned int ModPlug_NumInstruments(ModPlugFile* file); MODPLUG_EXPORT unsigned int ModPlug_NumInstruments(ModPlugFile* file);
MODPLUG_EXPORT unsigned int ModPlug_NumSamples(ModPlugFile* file); MODPLUG_EXPORT unsigned int ModPlug_NumSamples(ModPlugFile* file);

View file

@ -459,7 +459,7 @@ typedef struct _MODCOMMAND
class MODPLUG_EXPORT IMixPlugin class MODPLUG_EXPORT IMixPlugin
{ {
public: public:
virtual ~IMixPlugin(); virtual ~IMixPlugin() {};
virtual int AddRef() = 0; virtual int AddRef() = 0;
virtual int Release() = 0; virtual int Release() = 0;
virtual void SaveAllParameters() = 0; virtual void SaveAllParameters() = 0;
@ -539,14 +539,25 @@ class MODPLUG_EXPORT CSoundFile
//============== //==============
{ {
public: // Static Members public: // Static Members
static UINT m_nXBassDepth, m_nXBassRange; static UINT m_nXBassDepth;
static UINT m_nReverbDepth, m_nReverbDelay, gnReverbType; static UINT m_nXBassRange;
static UINT m_nProLogicDepth, m_nProLogicDelay; static UINT m_nReverbDepth;
static UINT m_nReverbDelay;
static UINT gnReverbType;
static UINT m_nProLogicDepth;
static UINT m_nProLogicDelay;
static UINT m_nStereoSeparation; static UINT m_nStereoSeparation;
static UINT m_nMaxMixChannels; static UINT m_nMaxMixChannels;
static LONG m_nStreamVolume; static LONG m_nStreamVolume;
static DWORD gdwSysInfo, gdwSoundSetup, gdwMixingFreq, gnBitsPerSample, gnChannels; static DWORD gdwSysInfo;
static UINT gnAGC, gnVolumeRampSamples, gnVUMeter, gnCPUUsage; static DWORD gdwSoundSetup;
static DWORD gdwMixingFreq;
static DWORD gnBitsPerSample;
static DWORD gnChannels;
static UINT gnAGC;
static UINT gnVolumeRampSamples;
static UINT gnVUMeter;
static UINT gnCPUUsage;
static LPSNDMIXHOOKPROC gpSndMixHook; static LPSNDMIXHOOKPROC gpSndMixHook;
static PMIXPLUGINCREATEPROC gpMixPluginCreateProc; static PMIXPLUGINCREATEPROC gpMixPluginCreateProc;
@ -567,7 +578,7 @@ public: // for Editing
UINT m_nType, m_nSamples, m_nInstruments; UINT m_nType, m_nSamples, m_nInstruments;
UINT m_nTickCount, m_nTotalCount, m_nPatternDelay, m_nFrameDelay; UINT m_nTickCount, m_nTotalCount, m_nPatternDelay, m_nFrameDelay;
UINT m_nMusicSpeed, m_nMusicTempo; UINT m_nMusicSpeed, m_nMusicTempo;
UINT m_nNextRow, m_nRow; UINT m_nNextRow, m_nRow, m_nNextStartRow;
UINT m_nPattern,m_nCurrentPattern,m_nNextPattern,m_nRestartPos; UINT m_nPattern,m_nCurrentPattern,m_nNextPattern,m_nRestartPos;
UINT m_nMasterVolume, m_nGlobalVolume, m_nSongPreAmp; UINT m_nMasterVolume, m_nGlobalVolume, m_nSongPreAmp;
UINT m_nFreqFactor, m_nTempoFactor, m_nOldGlbVolSlide; UINT m_nFreqFactor, m_nTempoFactor, m_nOldGlbVolSlide;

View file

@ -21,6 +21,9 @@
# include <stdint.h> # include <stdint.h>
#endif #endif
/* disable AGC and FILESAVE for all targets for uniformity. */
#define NO_AGC
#define MODPLUG_NO_FILESAVE
#ifdef _WIN32 #ifdef _WIN32
@ -43,9 +46,11 @@
inline void ProcessPlugins(int n) {} inline void ProcessPlugins(int n) {}
#define strncasecmp(a,b,c) strncmp(a,b,c) #undef strcasecmp
#define strcasecmp(a,b) strcmp(a,b) #undef strncasecmp
#define strnicmp(a,b,c) strncasecmp(a,b,c) #define strcasecmp(a,b) _stricmp(a,b)
#define strncasecmp(a,b,c) _strnicmp(a,b,c)
#define HAVE_SINF 1 #define HAVE_SINF 1
#ifndef isblank #ifndef isblank
@ -85,21 +90,20 @@ typedef void VOID;
inline LONG MulDiv (long a, long b, long c) inline LONG MulDiv (long a, long b, long c)
{ {
// if (!c) return 0; /*if (!c) return 0;*/
return ((uint64_t) a * (uint64_t) b ) / c; return ((uint64_t) a * (uint64_t) b ) / c;
} }
#define MODPLUG_NO_FILESAVE
#define NO_AGC
#define LPCTSTR LPCSTR #define LPCTSTR LPCSTR
#define lstrcpyn strncpy #define lstrcpyn strncpy
#define lstrcpy strcpy #define lstrcpy strcpy
#define lstrcmp strcmp #define lstrcmp strcmp
#define wsprintf sprintf
#define WAVE_FORMAT_PCM 1 #define WAVE_FORMAT_PCM 1
//#define ENABLE_EQ
#define GHND 0 #define GHND 0
#define GlobalFreePtr(p) free((void *)(p))
inline int8_t * GlobalAllocPtr(unsigned int, size_t size) inline int8_t * GlobalAllocPtr(unsigned int, size_t size)
{ {
int8_t * p = (int8_t *) malloc(size); int8_t * p = (int8_t *) malloc(size);
@ -110,11 +114,6 @@ inline int8_t * GlobalAllocPtr(unsigned int, size_t size)
inline void ProcessPlugins(int n) {} inline void ProcessPlugins(int n) {}
#define GlobalFreePtr(p) free((void *)(p))
#define strnicmp(a,b,c) strncasecmp(a,b,c)
#define wsprintf sprintf
#ifndef FALSE #ifndef FALSE
#define FALSE false #define FALSE false
#endif #endif
@ -123,7 +122,7 @@ inline void ProcessPlugins(int n) {}
#define TRUE true #define TRUE true
#endif #endif
#endif // _WIN32 #endif /* _WIN32 */
#if defined(_WIN32) || defined(__CYGWIN__) #if defined(_WIN32) || defined(__CYGWIN__)
# if defined(MODPLUG_BUILD) && defined(DLL_EXPORT) /* building libmodplug as a dll for windows */ # if defined(MODPLUG_BUILD) && defined(DLL_EXPORT) /* building libmodplug as a dll for windows */
@ -133,14 +132,10 @@ inline void ProcessPlugins(int n) {}
# else # else
# define MODPLUG_EXPORT __declspec(dllimport) /* using libmodplug dll for windows */ # define MODPLUG_EXPORT __declspec(dllimport) /* using libmodplug dll for windows */
# endif # endif
/* FIXME: USE VISIBILITY ATTRIBUTES HERE */ #elif defined(MODPLUG_BUILD) && defined(SYM_VISIBILITY)
#elif defined(MODPLUG_BUILD) # define MODPLUG_EXPORT __attribute__((visibility("default")))
#define MODPLUG_EXPORT
#else #else
#define MODPLUG_EXPORT #define MODPLUG_EXPORT
#endif #endif
#endif #endif

Binary file not shown.