Introduction
At first time,this is update.This project introduces how to use waveInopen and waveOutopen to recording and play the waveform audio.This is MFC application using VC++.The purpose is to help to understand waveform audio function,so that i don't build completely a program recording.
What will you find in my demo:
1. I use C to write some function:
DoRecord(): to begin record.
DoRecord_end(): to end record
DoPlay(): to play the recording voice.
2. In function DoRecord():
I show you how to use WaveInOpen with CALLBACK_FUNCTION waveInproc. I also show you how to use waveInPrepareHeader,waveInAddBuffer and waveInStart to begin recording your voice.Specially, i introduce how to use waveInproc.
3. In fucntion DoPlay():
I show you how to use WaveOutOpen,waveOutPrepareHeader,waveOutWrite.
Demo:
1) Click Record to begin recording your voice.
2) Click Record_end when you finish your recording.
3) Click Play to hear your voice.
Future:
I will add some function to allow to save your recording to a file wav. And some other function to allow to choose the format of wave audio.
I will show some other technique to use CALLBACK like CALLBACK_EVENT,CALLBACK_WINDOW or CALLBACK_THREAD to process the voice recording.
I will add some other function socket or rtp so you can transfer your recording or to voice chat with other.
License
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
本文介绍了一个使用VC++和MFC实现的录音与播放项目的示例代码。该程序通过WaveIn和WaveOut API演示了如何录制和播放音频。文中详细解释了关键函数的用法,并提供了实际操作步骤。
4345

被折叠的 条评论
为什么被折叠?



