通过使用麦克风录制播放声音来测量扬声器音量

问题描述:

我想通过播放声音并同时在本地麦克风上收听来测量系统的扬声器音量.这是针对特定应用的.准确录制的声音不如区分播放声音之前和播放时录制的麦克风音量重要.

I want to measure a system's speaker volume by playing a sound and listening for it on a local microphone at the same time. This is for a specific application. The exact recorded sound is not as important as differentiating between the microphone volume recorded before the sound is played and while it is playing.

这个想法是在扬声器关闭或太低时警告用户.如何在播放时录制声音并确定音量差异?是否有任何托管库可以执行此操作?

The idea is to warn the user if speakers are turned off or too low. How can I record a sound while playing it and determine a difference in volume? Are there are any managed libraries to do this?

更新:发现一个很好的相关问题.

拿这个:

http://windowsmedianet.sourceforge.net/

并使用 waveIn 托管包装器.

and use waveIn managed wrapper.

http://msdn.microsoft.com/en-us/library/ms712636(VS.85).aspx

当然,您需要在那里进行一些校准...

Of course, you'll need some calibration there...