tags:

views:

399

answers:

2

I'm using VisualBasic (and I'm kind of new to it) how can I check if the microphone is on? I'm capturing a video from the web cam, but I need also to make sure that the microphone is on. I caould not find out how to check that. Please help

+1  A: 

You need to sample some audio, measure the level of the signal you're receiving (peak or RMS or something), and then judge if it's more than just the noise-floor of the microphone input on the PC.

I don't think there's any OS help to do this specifically.

You might need to come back with "How do I capture an array of audio samples in VB?", or something like that.

Will Dean
A: 

No VB experience, but if you want to check if a users mic is working (and as far as you can see programmatically it is), it may be helpful to look at how an app like Skype does it; asking the user to verify manually (version 4 does quite well with this, I think). Games like Enemy Territory: Quake Wars and the Source Engine games do similar things. Of course, that may not be appropriate for what you are doing, and something like Will suggests may be far more appropriate.

Bernard
My guess is that Skype does pretty much what I was suggesting - they're going to be capturing the raw data *anyway*, so analysing it to see if it looks like it's picking anything up would be pretty easy.
Will Dean
I suppose you're right.
Bernard