windev.h
来自「evc编写的wave文件波形播放」· C头文件 代码 · 共 50 行
H
50 行
#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 + =
减小字号Ctrl + -
显示快捷键?