modplug.h   modplug.h 
skipping to change at line 14 skipping to change at line 14
* Authors: Kenton Varda <temporal@gauge3d.org> (C interface wrapper) * Authors: Kenton Varda <temporal@gauge3d.org> (C interface wrapper)
*/ */
#ifndef MODPLUG_H__INCLUDED #ifndef MODPLUG_H__INCLUDED
#define MODPLUG_H__INCLUDED #define MODPLUG_H__INCLUDED
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#if defined(_WIN32) || defined(__CYGWIN__)
# if defined(MODPLUG_BUILD) && defined(DLL_EXPORT) /* building libmodpl
ug as a dll for windows */
# define MODPLUG_EXPORT __declspec(dllexport)
# elif defined(MODPLUG_BUILD) || defined(MODPLUG_STATIC) /* building
or using static libmodplug for windows */
# define MODPLUG_EXPORT
# else
# define MODPLUG_EXPORT __declspec(dllimport) /* u
sing libmodplug dll for windows */
# endif
/* FIXME: USE VISIBILITY ATTRIBUTES HERE */
#elif defined(MODPLUG_BUILD)
#define MODPLUG_EXPORT
#else
#define MODPLUG_EXPORT
#endif
struct _ModPlugFile; struct _ModPlugFile;
typedef struct _ModPlugFile ModPlugFile; typedef struct _ModPlugFile ModPlugFile;
struct _ModPlugNote { struct _ModPlugNote {
unsigned char Note; unsigned char Note;
unsigned char Instrument; unsigned char Instrument;
unsigned char VolumeEffect; unsigned char VolumeEffect;
unsigned char Effect; unsigned char Effect;
unsigned char Volume; unsigned char Volume;
unsigned char Parameter; unsigned char Parameter;
}; };
typedef struct _ModPlugNote ModPlugNote; typedef struct _ModPlugNote ModPlugNote;
typedef void (*ModPlugMixerProc)(int*, unsigned long, unsigned long); typedef void (*ModPlugMixerProc)(int*, unsigned long, unsigned long);
/* Load a mod file. [data] should point to a block of memory containing th e complete /* Load a mod file. [data] should point to a block of memory containing th e complete
* file, and [size] should be the size of that block. * file, and [size] should be the size of that block.
* Return the loaded mod file on success, or NULL on failure. */ * Return the loaded mod file on success, or NULL on failure. */
ModPlugFile* ModPlug_Load(const void* data, int size); MODPLUG_EXPORT ModPlugFile* ModPlug_Load(const void* data, int size);
/* Unload a mod file. */ /* Unload a mod file. */
void ModPlug_Unload(ModPlugFile* file); MODPLUG_EXPORT void ModPlug_Unload(ModPlugFile* file);
/* Read sample data into the buffer. Returns the number of bytes read. If the end /* Read sample data into the buffer. Returns the number of bytes read. If the end
* of the mod has been reached, zero is returned. */ * of the mod has been reached, zero is returned. */
int ModPlug_Read(ModPlugFile* file, void* buffer, int size); MODPLUG_EXPORT int ModPlug_Read(ModPlugFile* file, void* buffer, int size) ;
/* Get the name of the mod. The returned buffer is stored within the ModPl ugFile /* Get the name of the mod. The returned buffer is stored within the ModPl ugFile
* structure and will remain valid until you unload the file. */ * structure and will remain valid until you unload the file. */
const char* ModPlug_GetName(ModPlugFile* file); MODPLUG_EXPORT const char* ModPlug_GetName(ModPlugFile* file);
/* Get the length of the mod, in milliseconds. Note that this result is no t always /* Get the length of the mod, in milliseconds. Note that this result is no t always
* accurate, especially in the case of mods with loops. */ * accurate, especially in the case of mods with loops. */
int ModPlug_GetLength(ModPlugFile* file); MODPLUG_EXPORT int ModPlug_GetLength(ModPlugFile* file);
/* Seek to a particular position in the song. Note that seeking and MODs d on't mix very /* Seek to a particular position in the song. Note that seeking and MODs d on't mix very
* well. Some mods will be missing instruments for a short time after a se ek, as ModPlug * well. Some mods will be missing instruments for a short time after a se ek, as ModPlug
* does not scan the sequence backwards to find out which instruments were supposed to be * does not scan the sequence backwards to find out which instruments were supposed to be
* playing at that time. (Doing so would be difficult and not very reliabl e.) Also, * playing at that time. (Doing so would be difficult and not very reliabl e.) Also,
* note that seeking is not very exact in some mods -- especially those for which * note that seeking is not very exact in some mods -- especially those for which
* ModPlug_GetLength() does not report the full length. */ * ModPlug_GetLength() does not report the full length. */
void ModPlug_Seek(ModPlugFile* file, int millisecond); MODPLUG_EXPORT void ModPlug_Seek(ModPlugFile* file, int millisecond);
enum _ModPlug_Flags enum _ModPlug_Flags
{ {
MODPLUG_ENABLE_OVERSAMPLING = 1 << 0, /* Enable oversampling (* highly* recommended) */ MODPLUG_ENABLE_OVERSAMPLING = 1 << 0, /* Enable oversampling (* highly* recommended) */
MODPLUG_ENABLE_NOISE_REDUCTION = 1 << 1, /* Enable noise reduction */ MODPLUG_ENABLE_NOISE_REDUCTION = 1 << 1, /* Enable noise reduction */
MODPLUG_ENABLE_REVERB = 1 << 2, /* Enable reverb */ MODPLUG_ENABLE_REVERB = 1 << 2, /* Enable reverb */
MODPLUG_ENABLE_MEGABASS = 1 << 3, /* Enable megabass */ MODPLUG_ENABLE_MEGABASS = 1 << 3, /* Enable megabass */
MODPLUG_ENABLE_SURROUND = 1 << 4 /* Enable surround sound. */ MODPLUG_ENABLE_SURROUND = 1 << 4 /* Enable surround sound. */
}; };
skipping to change at line 100 skipping to change at line 115
int mBassRange; /* XBass cutoff in Hz 10-100 */ int mBassRange; /* XBass cutoff in Hz 10-100 */
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 loop ing. int mLoopCount; /* Number of times to loop. Zero prevents loop ing.
-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,
* sampling rate, and loop count, will take effect immediately. Those opti ons which don't * sampling rate, and loop count, will take effect immediately. Those opti ons which don't
* take effect immediately will take effect the next time you load a mod. * / * take effect immediately will take effect the next time you load a mod. * /
void ModPlug_GetSettings(ModPlug_Settings* settings); MODPLUG_EXPORT void ModPlug_GetSettings(ModPlug_Settings* settings);
void ModPlug_SetSettings(const ModPlug_Settings* settings); MODPLUG_EXPORT void ModPlug_SetSettings(const ModPlug_Settings* settings);
/* New ModPlug API Functions */ /* New ModPlug API Functions */
/* NOTE: Master Volume (1-512) */ /* NOTE: Master Volume (1-512) */
unsigned int ModPlug_GetMasterVolume(ModPlugFile* file) ; MODPLUG_EXPORT unsigned int ModPlug_GetMasterVolume(ModPlugFile* file) ;
void ModPlug_SetMasterVolume(ModPlugFile* file,unsigned int cvol) ; MODPLUG_EXPORT void ModPlug_SetMasterVolume(ModPlugFile* file,unsigned int
cvol) ;
int ModPlug_GetCurrentSpeed(ModPlugFile* file); MODPLUG_EXPORT int ModPlug_GetCurrentSpeed(ModPlugFile* file);
int ModPlug_GetCurrentTempo(ModPlugFile* file); MODPLUG_EXPORT int ModPlug_GetCurrentTempo(ModPlugFile* file);
int ModPlug_GetCurrentOrder(ModPlugFile* file); MODPLUG_EXPORT int ModPlug_GetCurrentOrder(ModPlugFile* file);
int ModPlug_GetCurrentPattern(ModPlugFile* file); MODPLUG_EXPORT int ModPlug_GetCurrentPattern(ModPlugFile* file);
int ModPlug_GetCurrentRow(ModPlugFile* file); MODPLUG_EXPORT int ModPlug_GetCurrentRow(ModPlugFile* file);
int ModPlug_GetPlayingChannels(ModPlugFile* file); MODPLUG_EXPORT int ModPlug_GetPlayingChannels(ModPlugFile* file);
void ModPlug_SeekOrder(ModPlugFile* file,int order); MODPLUG_EXPORT void ModPlug_SeekOrder(ModPlugFile* file,int order);
int ModPlug_GetModuleType(ModPlugFile* file); MODPLUG_EXPORT int ModPlug_GetModuleType(ModPlugFile* file);
char* ModPlug_GetMessage(ModPlugFile* file); MODPLUG_EXPORT char* ModPlug_GetMessage(ModPlugFile* file);
#ifndef MODPLUG_NO_FILESAVE #ifndef MODPLUG_NO_FILESAVE
/* /*
* EXPERIMENTAL Export Functions * EXPERIMENTAL Export Functions
*/ */
/*Export to a Scream Tracker 3 S3M module. EXPERIMENTAL (only works on Litt le-Endian platforms)*/ /*Export to a Scream Tracker 3 S3M module. EXPERIMENTAL (only works on Litt le-Endian platforms)*/
char ModPlug_ExportS3M(ModPlugFile* file, const char* filepath); MODPLUG_EXPORT char ModPlug_ExportS3M(ModPlugFile* file, const char* filepa th);
/*Export to a Extended Module (XM). EXPERIMENTAL (only works on Little-Endi an platforms)*/ /*Export to a Extended Module (XM). EXPERIMENTAL (only works on Little-Endi an platforms)*/
char ModPlug_ExportXM(ModPlugFile* file, const char* filepath); MODPLUG_EXPORT char ModPlug_ExportXM(ModPlugFile* file, const char* filepat h);
/*Export to a Amiga MOD file. EXPERIMENTAL.*/ /*Export to a Amiga MOD file. EXPERIMENTAL.*/
char ModPlug_ExportMOD(ModPlugFile* file, const char* filepath); MODPLUG_EXPORT char ModPlug_ExportMOD(ModPlugFile* file, const char* filepa th);
/*Export to a Impulse Tracker IT file. Should work OK in Little-Endian & Bi g-Endian platforms :-) */ /*Export to a Impulse Tracker IT file. Should work OK in Little-Endian & Bi g-Endian platforms :-) */
char ModPlug_ExportIT(ModPlugFile* file, const char* filepath); MODPLUG_EXPORT char ModPlug_ExportIT(ModPlugFile* file, const char* filepat h);
#endif // MODPLUG_NO_FILESAVE #endif // MODPLUG_NO_FILESAVE
unsigned int ModPlug_NumInstruments(ModPlugFile* file); MODPLUG_EXPORT unsigned int ModPlug_NumInstruments(ModPlugFile* file);
unsigned int ModPlug_NumSamples(ModPlugFile* file); MODPLUG_EXPORT unsigned int ModPlug_NumSamples(ModPlugFile* file);
unsigned int ModPlug_NumPatterns(ModPlugFile* file); MODPLUG_EXPORT unsigned int ModPlug_NumPatterns(ModPlugFile* file);
unsigned int ModPlug_NumChannels(ModPlugFile* file); MODPLUG_EXPORT unsigned int ModPlug_NumChannels(ModPlugFile* file);
unsigned int ModPlug_SampleName(ModPlugFile* file, unsigned int qual, char* MODPLUG_EXPORT unsigned int ModPlug_SampleName(ModPlugFile* file, unsigned
buff); int qual, char* buff);
unsigned int ModPlug_InstrumentName(ModPlugFile* file, unsigned int qual, c MODPLUG_EXPORT unsigned int ModPlug_InstrumentName(ModPlugFile* file, unsig
har* buff); ned int qual, char* buff);
/* /*
* Retrieve pattern note-data * Retrieve pattern note-data
*/ */
ModPlugNote* ModPlug_GetPattern(ModPlugFile* file, int pattern, unsigned in t* numrows); MODPLUG_EXPORT ModPlugNote* ModPlug_GetPattern(ModPlugFile* file, int patte rn, unsigned int* numrows);
/* /*
* ================= * =================
* Mixer callback * Mixer callback
* ================= * =================
* *
* Use this callback if you want to 'modify' the mixed data of LibModPlug. * Use this callback if you want to 'modify' the mixed data of LibModPlug.
* *
* void proc(int* buffer,unsigned long channels,unsigned long nsamples) ; * void proc(int* buffer,unsigned long channels,unsigned long nsamples) ;
* *
* 'buffer': A buffer of mixed samples * 'buffer': A buffer of mixed samples
* 'channels': N. of channels in the buffer * 'channels': N. of channels in the buffer
* 'nsamples': N. of samples in the buffeer (without taking care of n.chann els) * 'nsamples': N. of samples in the buffeer (without taking care of n.chann els)
* *
* (Samples are signed 32-bit integers) * (Samples are signed 32-bit integers)
*/ */
void ModPlug_InitMixerCallback(ModPlugFile* file,ModPlugMixerProc proc) ; MODPLUG_EXPORT void ModPlug_InitMixerCallback(ModPlugFile* file,ModPlugMixe
void ModPlug_UnloadMixerCallback(ModPlugFile* file) ; rProc proc) ;
MODPLUG_EXPORT void ModPlug_UnloadMixerCallback(ModPlugFile* file) ;
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
#endif #endif
#endif #endif
 End of changes. 17 change blocks. 
35 lines changed or deleted 55 lines changed or added


 sndfile.h   sndfile.h 
skipping to change at line 447 skipping to change at line 447
BYTE volcmd; BYTE volcmd;
BYTE command; BYTE command;
BYTE vol; BYTE vol;
BYTE param; BYTE param;
} MODCOMMAND, *LPMODCOMMAND; } MODCOMMAND, *LPMODCOMMAND;
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Mix Plugins // Mix Plugins
#define MIXPLUG_MIXREADY 0x01 // Set when cleared #define MIXPLUG_MIXREADY 0x01 // Set when cleared
class 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;
virtual void RestoreAllParameters() = 0; virtual void RestoreAllParameters() = 0;
virtual void Process(float *pOutL, float *pOutR, unsigned long nSamp les) = 0; virtual void Process(float *pOutL, float *pOutR, unsigned long nSamp les) = 0;
virtual void Init(unsigned long nFreq, int bReset) = 0; virtual void Init(unsigned long nFreq, int bReset) = 0;
virtual void MidiSend(DWORD dwMidiCode) = 0; virtual void MidiSend(DWORD dwMidiCode) = 0;
skipping to change at line 522 skipping to change at line 522
char szMidiGlb[9*32]; // changed from CHAR char szMidiGlb[9*32]; // changed from CHAR
char szMidiSFXExt[16*32]; // changed from CHAR char szMidiSFXExt[16*32]; // changed from CHAR
char szMidiZXXExt[128*32]; // changed from CHAR char szMidiZXXExt[128*32]; // changed from CHAR
} MODMIDICFG, *LPMODMIDICFG; } MODMIDICFG, *LPMODMIDICFG;
#define NOTE_MAX 120 //Defines maximum notevalue as well as maximum number of notes. #define NOTE_MAX 120 //Defines maximum notevalue as well as maximum number of notes.
typedef VOID (* LPSNDMIXHOOKPROC)(int *, unsigned long, unsigned long); // buffer, samples, channels typedef VOID (* LPSNDMIXHOOKPROC)(int *, unsigned long, unsigned long); // buffer, samples, channels
//============== //==============
class CSoundFile class MODPLUG_EXPORT CSoundFile
//============== //==============
{ {
public: // Static Members public: // Static Members
static UINT m_nXBassDepth, m_nXBassRange; static UINT m_nXBassDepth, m_nXBassRange;
static UINT m_nReverbDepth, m_nReverbDelay, gnReverbType; static UINT m_nReverbDepth, m_nReverbDelay, gnReverbType;
static UINT m_nProLogicDepth, m_nProLogicDelay; static UINT m_nProLogicDepth, 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, gnBitsPerSamp le, gnChannels; static DWORD gdwSysInfo, gdwSoundSetup, gdwMixingFreq, gnBitsPerSamp le, gnChannels;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 stdafx.h   stdafx.h 
skipping to change at line 50 skipping to change at line 50
#define random() rand() #define random() rand()
#define sleep(_ms) Sleep(_ms) #define sleep(_ms) Sleep(_ms)
inline void ProcessPlugins(int n) {} inline void ProcessPlugins(int n) {}
#define strncasecmp(a,b,c) strncmp(a,b,c) #define strncasecmp(a,b,c) strncmp(a,b,c)
#define strcasecmp(a,b) strcmp(a,b) #define strcasecmp(a,b) strcmp(a,b)
#define strnicmp(a,b,c) strncasecmp(a,b,c) #define strnicmp(a,b,c) strncasecmp(a,b,c)
#define HAVE_SINF 1 #define HAVE_SINF 1
#ifndef isblank
#define isblank(c) ((c) == ' ' || (c) == '\t')
#endif
#else #else
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#ifdef HAVE_MALLOC_H #ifdef HAVE_MALLOC_H
#include <malloc.h> #include <malloc.h>
#endif #endif
typedef int8_t CHAR; typedef int8_t CHAR;
skipping to change at line 123 skipping to change at line 127
#ifndef FALSE #ifndef FALSE
#define FALSE false #define FALSE false
#endif #endif
#ifndef TRUE #ifndef TRUE
#define TRUE true #define TRUE true
#endif #endif
#endif // _WIN32 #endif // _WIN32
#if defined(_WIN32) || defined(__CYGWIN__)
# if defined(MODPLUG_BUILD) && defined(DLL_EXPORT) /* building libmodpl
ug as a dll for windows */
# define MODPLUG_EXPORT __declspec(dllexport)
# elif defined(MODPLUG_BUILD) || defined(MODPLUG_STATIC) /* building
or using static libmodplug for windows */
# define MODPLUG_EXPORT
# else
# define MODPLUG_EXPORT __declspec(dllimport) /* u
sing libmodplug dll for windows */
# endif
/* FIXME: USE VISIBILITY ATTRIBUTES HERE */
#elif defined(MODPLUG_BUILD)
#define MODPLUG_EXPORT
#else
#define MODPLUG_EXPORT
#endif
#endif #endif
 End of changes. 2 change blocks. 
0 lines changed or deleted 22 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/