www.pudn.com > WinceWave.rar > winDev.h


#ifndef WINDEV_H 
#define WINDEV_H 
 
#define WAVEIN_BUF_SIZE		256 
#define WAVEIN_BUF_NUM		10 
#define WAVEOUT_BUF_SIZE	1024*24 
#define WAVEOUT_BUF_NUM		2 
 
#ifndef __plusplus 
extern "C" 
{ 
#endif 
 
struct recctx 
{ 
	unsigned int	devid; 
	waveinfo		info; 
	HWAVEIN			hdev; 
	WAVEFORMATEX	wfm; 
	WAVEHDR			wh[WAVEIN_BUF_NUM]; 
	unsigned long	userdata; 
	int				(*cbdatain)(recctx *pctx,unsigned char *buf,int buflen); 
}; 
 
struct playctx 
{ 
	unsigned int	devid; 
	waveinfo		info; 
	HWAVEOUT		hdev; 
	WAVEFORMATEX	wfm; 
	WAVEHDR			wh[WAVEOUT_BUF_NUM]; 
	unsigned long	userdata; 
	HANDLE			thread; 
	HANDLE			event; 
	unsigned long	(*cbdataout)(playctx *pctx,unsigned char *buf,int buflen); 
}; 
 
int startrecord(recctx *pctx, 
				int	(*datainproc)(recctx *pctx,unsigned char *buf,int buflen)); 
int stoprecord(recctx *pctx); 
int startplay(playctx *pctx, 
			  unsigned long	(*dataproc)(playctx *pctx,unsigned char *buf,int buflen)); 
int stopplay(playctx *pctx); 
 
 
#ifndef __plusplus 
} 
#endif 
 
#endif //WINDEV_H