CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VC/MFC >  基础类

录音问题

楼主liken218(想走走不了!)2002-10-25 09:27:21 在 VC/MFC / 基础类 提问

有人做过录音程吗?可否给我一个?  
  liken218@sohu.com  
  QQ:122733228 问题点数:100、回复次数:12Top

1 楼liken218(想走走不了!)回复于 2002-10-25 09:56:32 得分 0

没人响应吗?  
  up有分,先谢谢过了。Top

2 楼luxser(卷流 )(我心向天笑,快意写人生)回复于 2002-10-25 09:58:59 得分 0

呵呵  
  UpTop

3 楼dycdyc123(重出江湖)回复于 2002-10-25 10:40:51 得分 0

我给你!  
   
  联系?!Top

4 楼nike_ljq(好好赚钱)回复于 2002-10-25 10:44:53 得分 0

gz,  
  我也要一个啊,谢谢阿  
  nike_ljq@hotmail.comTop

5 楼RomanticProgrammer() 兰企鹅||南极俺最帅 ()回复于 2002-10-25 12:15:11 得分 0

请高手贴出来大家学习一下吗?  
  同意者举手!!Top

6 楼lysde(无所谓)回复于 2002-10-25 12:19:00 得分 0

up    
  也给我一个啦Top

7 楼lysde(无所谓)回复于 2002-10-25 12:19:38 得分 0

lysde@163.comTop

8 楼liken218(想走走不了!)回复于 2002-10-25 14:51:49 得分 0

我连脚一起举!Top

9 楼dycdyc123(重出江湖)回复于 2002-10-27 19:56:29 得分 0

ok  
  !接!  
  Top

10 楼xtao123456789(许涛)回复于 2002-10-29 00:02:36 得分 0

我QQ   19088897   有录音程序给我联系一下     谢了  
  Top

11 楼PheonixFly(神啊,救救我吧!)回复于 2002-11-26 16:17:49 得分 100

Recording   with   a   Waveform-Audio   Device  
  The   following   example   opens   a   waveform-audio   device   with   a   new   file,   records   for   the   specified   time,   plays   the   recording,   and   prompts   the   user   to   save   the   recording   if   desired.    
   
  //   Uses   the   MCI_OPEN,   MCI_RECORD,   and   MCI_SAVE   commands   to   record   and  
  //   save   a   waveform-audio   file.   Returns   0L   if   successful;   otherwise,  
  //   it   returns   an   MCI   error   code.  
  DWORD   recordWAVEFile(DWORD   dwMilliSeconds)  
  {  
          UINT   wDeviceID;  
          DWORD   dwReturn;  
          MCI_OPEN_PARMS   mciOpenParms;  
          MCI_RECORD_PARMS   mciRecordParms;  
          MCI_SAVE_PARMS   mciSaveParms;  
          MCI_PLAY_PARMS   mciPlayParms;  
   
          //   Open   a   waveform-audio   device   with   a   new   file   for   recording.  
          mciOpenParms.lpstrDeviceType   =   "waveaudio";  
          mciOpenParms.lpstrElementName   =   "";  
          if   (dwReturn   =   mciSendCommand(0,   MCI_OPEN,  
                  MCI_OPEN_ELEMENT   |   MCI_OPEN_TYPE,    
                  (DWORD)(LPVOID)   &mciOpenParms))  
          {  
                  //   Failed   to   open   device;   don't   close   it,   just   return   error.  
                  return   (dwReturn);  
          }  
   
          //   The   device   opened   successfully;   get   the   device   ID.  
          wDeviceID   =   mciOpenParms.wDeviceID;  
   
          //   Begin   recording   and   record   for   the   specified   number   of    
          //   milliseconds.   Wait   for   recording   to   complete   before   continuing.    
          //   Assume   the   default   time   format   for   the   waveform-audio   device    
          //   (milliseconds).  
          mciRecordParms.dwTo   =   dwMilliSeconds;  
          if   (dwReturn   =   mciSendCommand(wDeviceID,   MCI_RECORD,    
                  MCI_TO   |   MCI_WAIT,   (DWORD)(LPVOID)   &mciRecordParms))  
          {  
                  mciSendCommand(wDeviceID,   MCI_CLOSE,   0,   NULL);  
                  return   (dwReturn);  
          }  
   
          //   Play   the   recording   and   query   user   to   save   the   file.  
          mciPlayParms.dwFrom   =   0L;  
          if   (dwReturn   =   mciSendCommand(wDeviceID,   MCI_PLAY,  
                  MCI_FROM   |   MCI_WAIT,   (DWORD)(LPVOID)   &mciPlayParms))  
          {  
                  mciSendCommand(wDeviceID,   MCI_CLOSE,   0,   NULL);  
                  return   (dwReturn);  
          }  
          if   (MessageBox(hMainWnd,   "Do   you   want   to   save   this   recording?",  
                  "",   MB_YESNO)   ==   IDNO)  
          {  
                  mciSendCommand(wDeviceID,   MCI_CLOSE,   0,   NULL);  
                  return   (0L);  
          }  
   
          //   Save   the   recording   to   a   file   named   TEMPFILE.WAV.   Wait   for  
          //   the   operation   to   complete   before   continuing.  
          mciSaveParms.lpfilename   =   "tempfile.wav";  
          if   (dwReturn   =   mciSendCommand(wDeviceID,   MCI_SAVE,  
                  MCI_SAVE_FILE   |   MCI_WAIT,   (DWORD)(LPVOID)   &mciSaveParms))  
          {  
                  mciSendCommand(wDeviceID,   MCI_CLOSE,   0,   NULL);  
                  return   (dwReturn);  
          }  
   
          return   (0L);  
  }  
   
  Top

12 楼salichen(向前走,莫回头)回复于 2002-11-26 16:23:40 得分 0

谁会底层的,不是用mci?Top

相关问题

  • 录音
  • 如何录音?
  • 电话录音
  • 怎样录音?
  • WIN录音机为何无法录音?
  • java 如何录音?
  • MMControl 录音问题
  • 怎样作录音程序?
  • DirectSound录音的初始化
  • xp下录音问题?

关键词

  • a waveform
  • mci
  • mciopenparms
  • 录音
  • recording
  • parms
  • audio
  • save
  • open
  • dword

得分解答快速导航

  • 帖主:liken218
  • PheonixFly

相关链接

  • Visual C++类图书
  • Visual C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo