wpf - List of capture devices (e.g. Microphone, Stereo Mix...) in C# -


how can list of avalible sound devices? mean in image.

enter image description here

i want in combobox. mean only:

  • microphone
  • stereo mix
  • line in
  • ..and more..

but must because system changes name of device according language localization system, , that's need.

for example, in langueage microphone called mikrofon , stereo mix = směšovač stereo

enter image description here

and need names of devices, nothing other

can make example code?

following code should getting list of audio devices,

managementobjectsearcher objsearcher = new managementobjectsearcher(            "select * win32_sounddevice");      managementobjectcollection objcollection = objsearcher.get();      foreach (managementobject obj in objcollection)     {         foreach (propertydata property in obj.properties)         {             console.out.writeline(string.format("{0}:{1}", property.name, property.value));         }     } 

now, can enumerate on list using for-each.

edited

output this,

availability: caption:usb audio device configmanagererrorcode:0 configmanageruserconfig:false creationclassname:win32_sounddevice description:usb audio device deviceid:usb\vid_047f&pid_0ca1&mi_00\6&2c037688&0&0000 pnpdeviceid:usb\vid_047f&pid_0ca1&mi_00\6&2c037688&0&0000 powermanagementcapabilities: powermanagementsupported:false productname:usb audio device status:ok statusinfo:3 systemcreationclassname:win32_computersystem systemname: availability: caption:realtek ac'97 audio via (r) audio controller configmanagererrorcode:0 configmanageruserconfig:false creationclassname:win32_sounddevice description:realtek ac'97 audio via (r) audio controller deviceid:pci\ven_1106&dev_3059&subsys_09011558&rev_60\3&61aaa01&1&8d 

take caption value list. simple text parsing problem ;)


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -