Reputation: 66697
I want to see if there is a microphone active using Python.
How can I do it?
Thanks in advance!
Upvotes: 1
Views: 2547
Reputation: 66697
This is what I wanted:
import ctypes
from ctypes import *
winmm= windll.winmm
print 'waveInGetNumDevs=',winmm.waveInGetNumDevs()
Upvotes: 2
Reputation: 20878
Microphones are analog devices, most api's probably couldn't even tell you if there is a microphone plugged in, your computer just reads data from one of your soundcards input channels.
What you probably want to know is if the input channels are turned on or off. Determining that is highly platform specific.
Upvotes: 4