|
Windows环境下的麦克风录音系统(10) b.根据WAVE文件的结构,调用mmioRead、mmioWrite和mmioSeek函数实现文件的读、写和定位操作; c.调用mmioClose函数来关闭WAVE文件. 7.麦克录音系统的实现(MicDemo) 下面是该系统的界面:  对于录音来说最重要的就是CSoundIn类,下面就是该类的定义: namespace perdubug { // prevent the name-space pollution class CSoundIn { public: BOOL __initMic(); // get the best wave format supported by your sound card // and then i will use the format to capture sound. void __closeMic(); BOOL __openMic(); // open device and begin to capture with the best format(when // invoke __initMic function then you will get the best format // supported by host's sound card // // if your want to capture sound and export into a wav file please invoke this function // to tell me the full path then i will create the wav file. // void __createOutputWaveFile(const TCHAR * lpszFileName);
|