Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What determines the order for sound devices in windows when using winmm.dll?

I am trying to use NAudio to create a multiple sound output application. We have 8 USB sound cards installed. NAudio lets me use all 8 but I can't figure out a pattern for determining which device index is which card.

The cards will be hooked up to different hardware so it is important to make sure you know which card you are using.

I have been trying to use WMI to poll for the information but I can't seem to locate any information that determines the order of the sound devices.

Update: I forgot to include some information about this problem. The sound cards are all USB sound cards hooked up through a 12 port hub.

like image 561
Robin Robinson Avatar asked Oct 01 '09 18:10

Robin Robinson


People also ask

How do I change the default audio device in Windows?

Here's how: In the search box on the taskbar, type control panel, then select it from the results. Select Hardware and Sound from the Control Panel, and then select Sound. On the Playback tab, select and hold (or right-click) the listing for your audio device, select Set as Default Device, and then select OK.

How do I reorder audio devices in Windows 10?

To switch between audio output devices in Windows 10: Click the audio output icon in the taskbar system tray. Click the device name at the top of the audio controls flyout. Select a new output device from the list of devices.

How do you assign a program to a different audio output?

Press “Open Sound settings.” Scroll down and press “App volume and device preferences” under “Advanced sound options.” Find the program or app for which you want to customize the audio output device and press the lower arrow on the right. Select the desired audio output device.

Which output device is sound sent to in order to be heard?

Speakers are one of the most common output devices used with computer systems. Some speakers are designed to work specifically with computers, while others can be hooked up to any type of sound system. Regardless of their design, the purpose of speakers is to produce audio output that can be heard by the listener.


1 Answers

The order of devices is non deterministic for all versions of Windows. For Vista and above, the devices are typically ordered by the DSound GUID (more-or-less) so they're effectively random.

like image 175
ReinstateMonica Larry Osterman Avatar answered Sep 23 '22 12:09

ReinstateMonica Larry Osterman