[急问]VB里用API的mcisendstring函数问题!!!
用mcisendstring录音,如何将录音的内容放到一个Byte数组里.PS:我在做一个关于即时语音通讯的程序.不能直接从内存里拉出来么?...
用mcisendstring录音,如何将录音的内容放到一个Byte数组里.
PS:我在做一个关于即时语音通讯的程序.
不能直接从内存里拉出来么? 展开
PS:我在做一个关于即时语音通讯的程序.
不能直接从内存里拉出来么? 展开
1个回答
2010-02-15
展开全部
录音前,用以下语句初始化
1.设为8位:
mciSendString "set wave bitpersample 8", "", 0, 0
2.设为11025Hz
mciSendString "set wave samplespersec 11025", "", 0, 0
3.设为立体声:
mciSendString "set wave channels 2", "", 0, 0
4.实现PCM格式(不一定正确):
MCISENDSTRING "set wave format tag pcm","", 0, 0
5.开始录音:
mciSendString "close movie",0&,0,0
mciSendString "open new type WAVEAudio alias movie",0&,0,0
mciSendString "record movie",0&,0,0
6.保存录音到c:\123.wav
mciSendString "stop movie",0&,0,0
mciSendString "save movie C:\\123.wav",0&,0,0
mciSendString "close movie",0&,0,0
然后用二进制方式打开123,wav文件 Open "123.wav" For Binary 存于数组中
1.设为8位:
mciSendString "set wave bitpersample 8", "", 0, 0
2.设为11025Hz
mciSendString "set wave samplespersec 11025", "", 0, 0
3.设为立体声:
mciSendString "set wave channels 2", "", 0, 0
4.实现PCM格式(不一定正确):
MCISENDSTRING "set wave format tag pcm","", 0, 0
5.开始录音:
mciSendString "close movie",0&,0,0
mciSendString "open new type WAVEAudio alias movie",0&,0,0
mciSendString "record movie",0&,0,0
6.保存录音到c:\123.wav
mciSendString "stop movie",0&,0,0
mciSendString "save movie C:\\123.wav",0&,0,0
mciSendString "close movie",0&,0,0
然后用二进制方式打开123,wav文件 Open "123.wav" For Binary 存于数组中
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询