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