- /*录音*/
- CSoundRecord m_SoundRec;
- m_SoundRec.SetFile("D://MyWav.wav");
- if(!m_SoundRec.Record())
- {
- AfxMessageBox(_T("开始录制声音失败!"));
- }
- ………………………………………………………………………………
- /*播放*/
- CSoundPlay m_SoundPlay;
- m_SoundPlay.SetFile("D://MyWav.wav");
- m_SoundPlay.Play();
- ………………………………………………………………………………
- /*混音播放*/
- CSoundPlay m_SoundPlay1;
- CSoundPlay m_SoundPlay2;
- m_SoundPlay1.SetFile("D://MyWav1.wav");//请确认该文件名已经存在!
- m_SoundPlay2.SetFile("D://MyWav2.wav");//请确认该文件名已经存在!
- m_SoundPlay1.Play();
- m_SoundPlay2.Play();
- …………………………………………………………………………
利用DirectSound实现声卡录音【老毕改版】【Part4】
最新推荐文章于 2024-07-07 21:54:33 发布