|
|
| version 1.1, 2003/10/16 17:57:16 | version 1.3, 2005/02/07 14:46:08 |
|---|---|
| Line 11 | Line 11 |
| typedef struct { | typedef struct { |
| UINT32 sig; | UINT32 sig; |
| BYTE size[4]; | UINT8 size[4]; |
| UINT32 fmt; | UINT32 fmt; |
| } RIFF_HEADER; | } RIFF_HEADER; |
| typedef struct { | typedef struct { |
| UINT sig; | UINT sig; |
| BYTE size[4]; | UINT8 size[4]; |
| } WAVE_HEADER; | } WAVE_HEADER; |
| typedef struct { | typedef struct { |
| BYTE format[2]; | UINT8 format[2]; |
| BYTE channel[2]; | UINT8 channel[2]; |
| BYTE rate[4]; | UINT8 rate[4]; |
| BYTE rps[4]; | UINT8 rps[4]; |
| BYTE block[2]; | UINT8 block[2]; |
| BYTE bit[2]; | UINT8 bit[2]; |
| } WAVE_INFOS; | } WAVE_INFOS; |
| #if 0 | // ---- write |
| typedef long (*WFSEEK)(void *fh, long pos, int method); | |
| typedef UINT (*WFREAD)(void *fh, void *buf, UINT size); | |
| typedef struct { | typedef struct { |
| long fh; | |
| UINT rate; | UINT rate; |
| UINT channels; | UINT bits; |
| UINT bit; | UINT ch; |
| UINT size; | |
| UINT8 *ptr; | |
| UINT remain; | |
| UINT8 buf[4096]; | |
| } _WAVEWR, *WAVEWR; | |
| void *fh; | |
| WFREAD read; | #ifdef __cplusplus |
| WFSEEK seek; | extern "C" { |
| } _WAVHDL, *WAVHDL; | #endif |
| WAVHDL wavhdl_create(void *fh, WFSEEK seek, WFREAD read); | WAVEWR wavewr_open(const char *filename, UINT rate, UINT bits, UINT ch); |
| void wavhdl_destroy(WAVHDL hdl); | UINT wavewr_write(WAVEWR hdl, const void *buf, UINT size); |
| UINT wavhdl_getpcm(WAVHDL hdl, void *buf, UINT size); | void wavewr_close(WAVEWR hdl); |
| #ifdef __cplusplus | |
| } | |
| #endif | #endif |