欢迎来到天天文库
浏览记录
ID:25201978
大小:52.50 KB
页数:3页
时间:2018-11-18
《在 dos 下使用windows -.wav 文件论文》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、在DOS下使用Windows*.WAV文件论文摘要该文介绍了AXSIZE;unsignedclkdiv;intoldclk=0,running=1;voidsoundon();voidsoundoff();voidinterrupt(*oldint8h)();voidinterruptneplespersec;/*计算8253计数器0初始值*/oldint8h=getvect(0x08);/*保存旧的08H中断向量*/setvect(0x08,neain(intargc,char*argv){longj;intkey;char*s;
2、FILE*fp;/if(argc==1){printf("%s/n","AndTheeInmandLine!");exit(0);}else{if((fp=fopen(argvl,"rb"))==NULL){printf("CannotopentheDatafile%s/n",argv1;exit(0);}}if(fread(filehead,sizeof(structwave-file-head),1,fp)==NULL){printf("FileReadError!/n");exit(0);}fseek(fp,4,SEEK-CU
3、R);fread(datasize,4,1,fp);for(j=0;jdatasize;j++)volj=getc(fp);close(fp);printf("%s/n","NowSoundOn,PressESCtoStop!");soundon();for(;;){key=getch();if(key==27){soundoff();printf("%s/n","Soundoff!");break;}}}
此文档下载收益归作者所有