| version 1.10, 2006/12/16 09:43:24 | version 1.13, 2011/02/04 00:39:34 | 
| Line 1 | Line 1 | 
|  |  | 
| #if !defined(_WIN32_WCE) && !defined(SLZAURUS) | #if !defined(_WIN32_WCE) && !defined(SLZAURUS) | 
| #define ENABLE_TREMOLO | #define ENABLE_TREMOLO | 
| #define ENABLE_VIRLATE | #define ENABLE_VIRLATE | 
| #else | #else | 
| #define MIDI_GMONLY | #define MIDI_GMONLY | 
| #endif | #endif | 
| #define ENABLE_GSRX | #define ENABLE_GSRX | 
| #define PANPOT_REVA | #define PANPOT_REVA | 
| // #define      VOLUME_ACURVE | // #define      VOLUME_ACURVE | 
| #define ENABLE_PORTB | #define ENABLE_PORTB | 
|  |  | 
| struct _midimodule; | #ifndef VERMOUTHCL | 
| typedef struct _midimodule      _MIDIMOD; | #define VERMOUTHCL | 
| typedef struct _midimodule      *MIDIMOD; | #endif | 
|  |  | 
| struct _midictrl; | struct _midimodule; | 
| typedef struct _midictrl        _MIDIHDL; | typedef struct _midimodule      _MIDIMOD; | 
| typedef struct _midictrl        *MIDIHDL; | typedef struct _midimodule      *MIDIMOD; | 
|  |  | 
| enum { | struct _midictrl; | 
| MIDIOUT_SUCCESS         = 0, | typedef struct _midictrl        _MIDIHDL; | 
| MIDIOUT_FAILURE         = -1, | typedef struct _midictrl        *MIDIHDL; | 
| MIDIOUT_ABORT           = -2 |  | 
| }; | enum { | 
|  | MIDIOUT_SUCCESS         = 0, | 
| #define VOICE_MAX               24 | MIDIOUT_FAILURE         = -1, | 
|  | MIDIOUT_ABORT           = -2 | 
| #define SAMP_SHIFT              12 | }; | 
| #define SAMP_LIMIT              ((1 << (SAMP_SHIFT + 1)) - 1) |  | 
|  | #define CHANNEL_MAX             16 | 
| #define FREQ_SHIFT              12 | #define VOICE_MAX               24 | 
| #define FREQ_MASK               ((1 << FREQ_SHIFT) - 1) |  | 
|  | #define SAMP_SHIFT              12 | 
| #define ENV_RATE                22 | #define SAMP_LIMIT              ((1 << (SAMP_SHIFT + 1)) - 1) | 
| #define ENVRATE_SHIFT   10 |  | 
|  | #define FREQ_SHIFT              12 | 
| #define TRESWEEP_SHIFT  16 | #define FREQ_MASK               ((1 << FREQ_SHIFT) - 1) | 
| #define TRERATE_SHIFT   5 |  | 
| #define TRESWEEP_TUNE   38 | #define ENV_RATE                22 | 
| #define TRERATE_TUNE    38 | #define ENVRATE_SHIFT   10 | 
|  |  | 
| #define VIBSWEEP_SHIFT  16 | #define TRESWEEP_SHIFT  16 | 
| #define VIBRATE_SHIFT   6 | #define TRERATE_SHIFT   5 | 
| #define VIBSWEEP_TUNE   38 | #define TRESWEEP_TUNE   38 | 
| #define VIBRATE_TUNE    38 | #define TRERATE_TUNE    38 | 
|  |  | 
| #define REL_COUNT               20 | #define VIBSWEEP_SHIFT  16 | 
|  | #define VIBRATE_SHIFT   6 | 
|  | #define VIBSWEEP_TUNE   38 | 
| #if defined(MIDI_GMONLY) | #define VIBRATE_TUNE    38 | 
| #define MIDI_BANKS      1 |  | 
| #else | #define REL_COUNT               20 | 
| #define MIDI_BANKS      128 |  | 
| #endif |  | 
|  | #if defined(MIDI_GMONLY) | 
| #include        "midimod.h" | #define MIDI_BANKS      1 | 
| #include        "midinst.h" | #else | 
| #include        "midvoice.h" | #define MIDI_BANKS      128 | 
| #include        "midtable.h" | #endif | 
|  |  | 
| struct _midimodule { |  | 
| UINT            samprate; | #include        "midimod.h" | 
| UINT            lockcount; | #include        "midinst.h" | 
| INSTRUMENT      *tone[MIDI_BANKS * 2]; | #include        "midvoice.h" | 
| TONECFG         tonecfg[MIDI_BANKS * 2]; | #include        "midtable.h" | 
|  |  | 
| PATHLIST        pathlist; |  | 
| LISTARRAY       pathtbl; | struct _midimodule { | 
| LISTARRAY       namelist; | UINT            samprate; | 
| }; | UINT            lockcount; | 
|  | INSTRUMENT      *tone[MIDI_BANKS * 2]; | 
|  | TONECFG         tonecfg[MIDI_BANKS * 2]; | 
| struct _midictrl { |  | 
| UINT            samprate; | PATHLIST        pathlist; | 
| UINT            worksize; | LISTARRAY       pathtbl; | 
| int                     level; | LISTARRAY       namelist; | 
| UINT8           status; | }; | 
| SINT8           gain; |  | 
| UINT8           master; | struct _midictrl { | 
| UINT8           moduleid; | UINT            samprate; | 
|  | UINT            worksize; | 
| MIDIMOD         module; | int                     level; | 
| INSTRUMENT      *bank0[2]; | UINT8           status; | 
|  | SINT8           gain; | 
| SINT32          *sampbuf; | UINT8           master; | 
| SAMPLE          resampbuf; | UINT8           moduleid; | 
|  |  | 
| #if defined(ENABLE_PORTB) | MIDIMOD         module; | 
| MIDIHDL         portb; | INSTRUMENT      *bank0[2]; | 
| #endif  // defined(ENABLE_PORTB); |  | 
|  | SINT32          *sampbuf; | 
| _CHANNEL        channel[16]; | SAMPLE          resampbuf; | 
| _VOICE          voice[VOICE_MAX]; |  | 
| }; | #if defined(ENABLE_PORTB) | 
|  | MIDIHDL         portb; | 
| struct _miditoneloadparam { | #endif  // defined(ENABLE_PORTB); | 
| void    *userdata; |  | 
| UINT    totaltones; | _CHANNEL        channel[CHANNEL_MAX]; | 
| UINT    progress; | _VOICE          voice[VOICE_MAX]; | 
| UINT    bank; | }; | 
| UINT    num; |  | 
| }; | struct _miditoneloadparam { | 
| typedef struct _miditoneloadparam       MIDIOUTLAEXPARAM; | void    *userdata; | 
| typedef int (*FNMIDIOUTLAEXCB)(MIDIOUTLAEXPARAM *param); | UINT    totaltones; | 
|  | UINT    progress; | 
| #ifndef VERMOUTH_EXPORTS | UINT    bank; | 
| #define VEXTERN | UINT    num; | 
| #define VEXPORT | }; | 
| #else |  | 
| #define VEXTERN         __declspec(dllexport) |  | 
| #define VEXPORT         WINAPI | #ifndef VERMOUTH_EXPORTS | 
| #endif | #define VEXTERN | 
|  | #define VEXPORT         VERMOUTHCL | 
| #ifdef __cplusplus | #else | 
| extern "C" { | #define VEXTERN         __declspec(dllexport) | 
| #endif | #define VEXPORT         WINAPI | 
|  | #endif | 
| VEXTERN UINT VEXPORT midiout_getver(char *string, int leng); |  | 
| VEXTERN _MIDIHDL * VEXPORT midiout_create(MIDIMOD module, UINT worksize); | #ifdef __cplusplus | 
| VEXTERN void VEXPORT midiout_destroy(MIDIHDL hdl); | extern "C" { | 
| VEXTERN void VEXPORT midiout_shortmsg(MIDIHDL hdl, UINT32 msg); | #endif | 
| VEXTERN void VEXPORT midiout_longmsg(MIDIHDL hdl, const UINT8 *msg, UINT size); |  | 
| VEXTERN const SINT32 * VEXPORT midiout_get(MIDIHDL hdl, UINT *samples); | VEXTERN UINT VEXPORT midiout_getver(char *string, int leng); | 
| VEXTERN UINT VEXPORT midiout_get16(MIDIHDL hdl, SINT16 *pcm, UINT size); | VEXTERN _MIDIHDL * VEXPORT midiout_create(MIDIMOD mod, UINT worksize); | 
| VEXTERN UINT VEXPORT midiout_get32(MIDIHDL hdl, SINT32 *pcm, UINT size); | VEXTERN void VEXPORT midiout_destroy(MIDIHDL hdl); | 
| VEXTERN void VEXPORT midiout_setgain(MIDIHDL hdl, int gain); | VEXTERN void VEXPORT midiout_shortmsg(MIDIHDL hdl, UINT32 msg); | 
| VEXTERN void VEXPORT midiout_setmoduleid(MIDIHDL hdl, UINT8 moduleid); | VEXTERN void VEXPORT midiout_longmsg(MIDIHDL hdl, const UINT8 *msg, UINT size); | 
| VEXTERN void VEXPORT midiout_setportb(MIDIHDL hdl, MIDIHDL portb); | VEXTERN const SINT32 * VEXPORT midiout_get(MIDIHDL hdl, UINT *samples); | 
|  | VEXTERN UINT VEXPORT midiout_get16(MIDIHDL hdl, SINT16 *pcm, UINT size); | 
| VEXTERN _MIDIMOD * VEXPORT midimod_create(UINT samprate); | VEXTERN UINT VEXPORT midiout_get32(MIDIHDL hdl, SINT32 *pcm, UINT size); | 
| VEXTERN void VEXPORT midimod_destroy(MIDIMOD hdl); | VEXTERN void VEXPORT midiout_setgain(MIDIHDL hdl, int gain); | 
| VEXTERN void VEXPORT midimod_loadprogram(MIDIMOD hdl, UINT num); | VEXTERN void VEXPORT midiout_setmoduleid(MIDIHDL hdl, UINT8 moduleid); | 
| VEXTERN void VEXPORT midimod_loadrhythm(MIDIMOD hdl, UINT num); | VEXTERN void VEXPORT midiout_setportb(MIDIHDL hdl, MIDIHDL portb); | 
| VEXTERN void VEXPORT midimod_loadgm(MIDIMOD hdl); |  | 
| VEXTERN void VEXPORT midimod_loadall(MIDIMOD hdl); | VEXTERN _MIDIMOD * VEXPORT midimod_create(UINT samprate); | 
| VEXTERN void VEXPORT midimod_loadallex(MIDIMOD hdl, FNMIDIOUTLAEXCB cb, void *userdata); | VEXTERN void VEXPORT midimod_destroy(MIDIMOD mod); | 
|  | VEXTERN BRESULT VEXPORT midimod_cfgload(MIDIMOD mod, const OEMCHAR *filename); | 
| #ifdef __cplusplus | VEXTERN void VEXPORT midimod_loadprogram(MIDIMOD mod, UINT num); | 
| } | VEXTERN void VEXPORT midimod_loadrhythm(MIDIMOD mod, UINT num); | 
| #endif | VEXTERN void VEXPORT midimod_loadgm(MIDIMOD mod); | 
|  | VEXTERN void VEXPORT midimod_loadall(MIDIMOD mod); | 
|  | VEXTERN int VEXPORT midimod_loadallex(MIDIMOD mod, FNMIDIOUTLAEXCB cb, | 
|  | void *userdata); | 
|  |  | 
|  | #ifdef __cplusplus | 
|  | } | 
|  | #endif | 
|  |  |