|
|
| version 1.1, 2005/03/02 04:28:08 | version 1.3, 2005/03/19 20:46:07 |
|---|---|
| Line 11 typedef struct { | Line 11 typedef struct { |
| HMODULE mod; | HMODULE mod; |
| BOOL opened; | BOOL opened; |
| UINT rate; | UINT rate; |
| int (*Open)(int rate, int reverb, int def, int revtype, int revtime, int revlvl); | int (WINAPI * Open)(int rate, int reverb, int def, int revtype, int revtime, int revlvl); |
| int (*Close)(void); | int (WINAPI * Close)(void); |
| int (*Write)(unsigned char data); | int (WINAPI * Write)(unsigned char data); |
| int (*Mix)(void *buff, unsigned long size); | int (WINAPI * Mix)(void *buff, unsigned long size); |
| } MT32SOUND; | } MT32SOUND; |
| static MT32SOUND mt32sound; | static MT32SOUND mt32sound; |
| typedef struct { | typedef struct { |
| const TCHAR *symbol; | const char *symbol; |
| UINT addr; | UINT addr; |
| } DLLPROC; | } DLLPROC; |
| static const TCHAR mt32sounddll[] = _T("mt32sound.dll"); | static const TCHAR mt32sounddll[] = _T("mt32sound.dll"); |
| static const TCHAR fn_mt32soundopen[] = _T("MT32Sound_Open"); | static const char fn_mt32soundopen[] = "MT32Sound_Open"; |
| static const TCHAR fn_mt32soundclose[] = _T("MT32Sound_Close"); | static const char fn_mt32soundclose[] = "MT32Sound_Close"; |
| static const TCHAR fn_mt32soundwrite[] = _T("MT32Sound_Write"); | static const char fn_mt32soundwrite[] = "MT32Sound_Write"; |
| static const TCHAR fn_mt32soundmix[] = _T("MT32Sound_Mix"); | static const char fn_mt32soundmix[] = "MT32Sound_Mix"; |
| static const DLLPROC dllproc[] = { | static const DLLPROC dllproc[] = { |
| {fn_mt32soundopen, offsetof(MT32SOUND, Open)}, | {fn_mt32soundopen, offsetof(MT32SOUND, Open)}, |
| Line 117 void mt32sound_close(void) { | Line 117 void mt32sound_close(void) { |
| void mt32sound_shortmsg(UINT32 msg) { | void mt32sound_shortmsg(UINT32 msg) { |
| int (*Write)(unsigned char data); | int (WINAPI * Write)(unsigned char data); |
| Write = mt32sound.Write; | Write = mt32sound.Write; |
| switch((msg >> 4) & (0xf0 >> 4)) { | switch((msg >> 4) & (0xf0 >> 4)) { |
| Line 141 void mt32sound_shortmsg(UINT32 msg) { | Line 141 void mt32sound_shortmsg(UINT32 msg) { |
| void mt32sound_longmsg(const UINT8 *ptr, UINT32 leng) { | void mt32sound_longmsg(const UINT8 *ptr, UINT32 leng) { |
| int (*Write)(unsigned char data); | int (WINAPI * Write)(unsigned char data); |
| Write = mt32sound.Write; | Write = mt32sound.Write; |
| while(leng) { | while(leng) { |