⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 windev.h

📁 evc编写的wave文件波形播放
💻 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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -