Reputation: 43
I'm Developing a voice recording system with the help of USB audio cards. Therefore I need to get the list of audio input devices to a listbox where I can select the audio input device. When I attempt to record, always the default audio device will be used. Im using VB.Net. Appreciate your kind help
Thank You
Upvotes: 1
Views: 2620
Reputation: 43
I've used below mentioned code and it worked for me
Dim objSearcher As New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_SoundDevice")
Dim objCollection As System.Management.ManagementObjectCollection = objSearcher.Get()
For Each obj As System.Management.ManagementObject In objCollection
ComboBox1.Items.Add(obj.GetPropertyValue("Caption").ToString())
Next
Upvotes: 1