chanuwick
chanuwick

Reputation: 43

Get audio input list in VB.net

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

Answers (1)

chanuwick
chanuwick

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

Related Questions