Alum
Alum

Reputation:

How To Check If Microphone Is On

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 webcam, but I also need to make sure that the microphone is on. I could not find out how to check that.

Upvotes: 0

Views: 1301

Answers (2)

Bernard
Bernard

Reputation: 45539

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.

Upvotes: 0

Will Dean
Will Dean

Reputation: 39530

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.

Upvotes: 1

Related Questions