Vizible’s Blog

Python – List audio device

Posted in Programming, Python by wearetherock on August 10, 2009

Code
=====================================

import win32com.client
wmi = win32com.client
wmi = win32com.client.GetObject('winmgmts:')

soundDevices = wmi.InstancesOf('Win32_SoundDevice')
for s in soundDevices :
	print s.Properties_('Name'), ':' , s.Properties_('Manufacturer'), ':' , s.Properties_('Status')

~
Output
=====================================
High Definition Audio Device : Microsoft : OK
USB Audio Device : (Generic USB Audio) : OK
~
Reference : http://www.dotnetframework.de/scripting/WMIReferenz.asp?C_Klasse=Win32_SoundDevice
~

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: