Skip to content

Commit

Permalink
external libs/libmodplug: tidy-up cxx interface export
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Nov 24, 2019
1 parent 2938460 commit c964b2c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
25 changes: 2 additions & 23 deletions external/libmodplug-0.8.9.0/src/libmodplug/sndfile.h
Expand Up @@ -43,7 +43,6 @@ typedef const BYTE * LPCBYTE;
#define MAX_EQ_BANDS 6
#define MAX_MIXPLUGINS 8


#define MOD_TYPE_NONE 0x00
#define MOD_TYPE_MOD 0x01
#define MOD_TYPE_S3M 0x02
Expand Down Expand Up @@ -74,8 +73,6 @@ typedef const BYTE * LPCBYTE;
#define MOD_TYPE_UMX 0x80000000 // Fake type
#define MAX_MODTYPE 24



// Channel flags:
// Bits 0-7: Sample Flags
#define CHN_16BIT 0x01
Expand Down Expand Up @@ -108,7 +105,6 @@ typedef const BYTE * LPCBYTE;
#define CHN_REVERB 0x4000000
#define CHN_NOREVERB 0x8000000


#define ENV_VOLUME 0x0001
#define ENV_VOLSUSTAIN 0x0002
#define ENV_VOLLOOP 0x0004
Expand Down Expand Up @@ -157,7 +153,6 @@ typedef const BYTE * LPCBYTE;
#define CMD_SETENVPOSITION 30
#define CMD_MIDI 31


// Volume Column commands
#define VOLCMD_VOLUME 1
#define VOLCMD_PANNING 2
Expand Down Expand Up @@ -278,7 +273,6 @@ typedef const BYTE * LPCBYTE;
#define SNDMIX_NOBACKWARDJUMPS 0x40000
#define SNDMIX_MAXDEFAULTPAN 0x80000 // Used by the MOD loader


// Reverb Types (GM2 Presets)
enum {
REVERBTYPE_SMALLROOM,
Expand All @@ -290,7 +284,6 @@ enum {
NUM_REVERBTYPES
};


enum {
SRCMODE_NEAREST,
SRCMODE_LINEAR,
Expand All @@ -299,7 +292,6 @@ enum {
NUM_SRC_MODES
};


// Sample Struct
typedef struct _MODINSTRUMENT
{
Expand All @@ -320,7 +312,6 @@ typedef struct _MODINSTRUMENT
CHAR name[22];
} MODINSTRUMENT;


// Instrument Struct
typedef struct _INSTRUMENTHEADER
{
Expand Down Expand Up @@ -369,7 +360,6 @@ typedef struct _INSTRUMENTHEADER
CHAR filename[12];
} INSTRUMENTHEADER;


// Channel Struct
typedef struct _MODCHANNEL
{
Expand Down Expand Up @@ -431,7 +421,6 @@ typedef struct _MODCHANNEL
BYTE nActiveMacro, nPadding;
} MODCHANNEL;


typedef struct _MODCHANNELSETTINGS
{
UINT nPan;
Expand All @@ -441,7 +430,6 @@ typedef struct _MODCHANNELSETTINGS
char szName[MAX_CHANNELNAME]; // changed from CHAR
} MODCHANNELSETTINGS;


typedef struct _MODCOMMAND
{
BYTE note;
Expand All @@ -456,7 +444,7 @@ typedef struct _MODCOMMAND
// Mix Plugins
#define MIXPLUG_MIXREADY 0x01 // Set when cleared

class /*MODPLUG_EXPORT*/ IMixPlugin
class MODPLUG_EXPORTPP IMixPlugin
{
public:
virtual ~IMixPlugin() {};
Expand Down Expand Up @@ -520,7 +508,6 @@ enum {
MIDIOUT_PROGRAM,
};


typedef struct MODMIDICFG
{
char szMidiGlb[9*32]; // changed from CHAR
Expand All @@ -533,9 +520,8 @@ typedef struct MODMIDICFG
typedef VOID (* LPSNDMIXHOOKPROC)(int *, unsigned long, unsigned long); // buffer, samples, channels



//==============
class /*MODPLUG_EXPORT*/ CSoundFile
class MODPLUG_EXPORTPP CSoundFile
//==============
{
public: // Static Members
Expand Down Expand Up @@ -857,7 +843,6 @@ typedef struct WAVEFILEHEADER
DWORD id_WAVE;
} WAVEFILEHEADER;


typedef struct WAVEFORMATHEADER
{
DWORD id_fmt; // "fmt "
Expand All @@ -870,14 +855,12 @@ typedef struct WAVEFORMATHEADER
WORD bitspersample; // bits per sample (8/16)
} WAVEFORMATHEADER;


typedef struct WAVEDATAHEADER
{
DWORD id_data; // "data"
DWORD length; // length of data
} WAVEDATAHEADER;


typedef struct WAVESMPLHEADER
{
// SMPL
Expand All @@ -894,7 +877,6 @@ typedef struct WAVESMPLHEADER
DWORD cbSamplerData;
} WAVESMPLHEADER;


typedef struct SAMPLELOOPSTRUCT
{
DWORD dwIdentifier;
Expand All @@ -905,22 +887,19 @@ typedef struct SAMPLELOOPSTRUCT
DWORD dwPlayCount; // Loop Count, 0=infinite
} SAMPLELOOPSTRUCT;


typedef struct WAVESAMPLERINFO
{
WAVESMPLHEADER wsiHdr;
SAMPLELOOPSTRUCT wsiLoops[2];
} WAVESAMPLERINFO;


typedef struct WAVELISTHEADER
{
DWORD list_id; // "LIST" -> 0x5453494C
DWORD list_len;
DWORD info; // "INFO"
} WAVELISTHEADER;


typedef struct WAVEEXTRAHEADER
{
DWORD xtra_id; // "xtra" -> 0x61727478
Expand Down
7 changes: 7 additions & 0 deletions external/libmodplug-0.8.9.0/src/libmodplug/stdafx.h
Expand Up @@ -21,6 +21,7 @@
# include <stdint.h>
#endif

/*#define CXX_INTERFACE*/ /* export C++ interface from dll. */
/*#define MMCMP_SUPPORT*/

/* disable AGC and FILESAVE for all targets for uniformity. */
Expand Down Expand Up @@ -149,4 +150,10 @@ inline void ProcessPlugins(int n) {}
#define MODPLUG_EXPORT
#endif

#if defined(CXX_INTERFACE)
#define MODPLUG_EXPORTPP MODPLUG_EXPORT
#else
#define MODPLUG_EXPORTPP
#endif

#endif

0 comments on commit c964b2c

Please sign in to comment.