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