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

 
  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. …………………………………………………………………………
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值