This project has moved and is read-only. For the latest updates, please go here.

USB headsets: how to associate WaveIn/WaveOut device numbers with USB DevicePath?

Mar 25, 2015 at 7:21 PM
Edited Mar 26, 2015 at 12:45 AM
i've got multiple USB headsets (i.e. mic and headphones) on my computer. these headsets also include a push-to-talk (PTT) button. to get mic and headset device numbers and names, i use these loops:
            for (int n = 0; n < WaveIn.DeviceCount; n++) {
                var capabilities = WaveIn.GetCapabilities(n);

            for (int n = 0; n < WaveOut.DeviceCount; n++) {
                var capabilities = WaveOut.GetCapabilities(n);
i also have another step that gets the DevicePath for the USB PTT part of the headset; i.e.
DevicePath = "\\\\?\\hid#vid_047f&pid_faa1&mi_03#8&23e2c66b&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}"
for my application, i now need a way to create a "headset" object which associates a WaveIn devicenumber, a WaveOut devicenumber, and a PTT device path.

is there any way in naudio to figure out the USB DevicePath that corresponds to a WaveIn or WaveOut devicenumber ?

many thanks.
May 7, 2015 at 2:28 PM
I had a similar problem with a project at work. I needed to associate a microphone and earphone into a headset object. You can see my solution on StackOverflow.

Hope this will help you.