现在的位置: 首页 > 综合 > 正文

利用DirectSound实现声卡录音【老毕改版】【Part4】

2014年01月18日 ⁄ 综合 ⁄ 共 500字 ⁄ 字号 评论关闭
 

  1. /*录音*/
  2. CSoundRecord m_SoundRec;
  3. m_SoundRec.SetFile("D://MyWav.wav");
  4. if(!m_SoundRec.Record())
  5. {
  6.  AfxMessageBox(_T("开始录制声音失败!"));
  7. }
  8. ………………………………………………………………………………
  9. /*播放*/
  10. CSoundPlay m_SoundPlay;
  11. m_SoundPlay.SetFile("D://MyWav.wav");
  12. m_SoundPlay.Play();
  13. ………………………………………………………………………………
  14. /*混音播放*/
  15. CSoundPlay m_SoundPlay1;
  16. CSoundPlay m_SoundPlay2;
  17. m_SoundPlay1.SetFile("D://MyWav1.wav");//请确认该文件名已经存在!
  18. m_SoundPlay2.SetFile("D://MyWav2.wav");//请确认该文件名已经存在!
  19. m_SoundPlay1.Play();
  20. m_SoundPlay2.Play();
  21. …………………………………………………………………………

抱歉!评论已关闭.