How to record sound from a microphone in VB6?

三世轮回 提交于 2019-12-11 06:28:32

问题


We've been recording sound for over a decade using what seems like a very clunky method using the Winmm.dll and the MCIsendString.

I've read that this doesn't set the recording quality value correctly (not sure if that article was ever true or is still true).

I was wondering if there is any better way to record sound, such as using the MCI control, etc.


回答1:


"Clunky" is right. I've also been using the MciSendString method. If you are willing to move off VB6, you could use the Microphone support in Silverlight 4. Combined with the out of browser support, it could conceivably replace you VB6 app. (sorry, long shot).




回答2:


I found one alternative way:

This alternative to MCISend is really complicated but does some neat stuff like: * Setting volume * Displaying sound meter in real time. * Displaying waveform in real time.

And I found some tips that may make the MCISendString work a bit better:

  1. This fellow claims that the MCISendString has a flaw (transposes some digits in some of the settings) which can cause the audio to not be playable in Windows Media Player.

  2. Someone reported needing to set the MCISendString parameters very carefully in a way not fully documented. This was in response to a report of poor recording quality.



来源:https://stackoverflow.com/questions/2886923/how-to-record-sound-from-a-microphone-in-vb6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!