What's the best way to enumerate audio adapters (sound cards) in Windows Vista and above using WinAPI (C++)?
Asked
Active
Viewed 2,326 times
3 Answers
1
I'd go with the lower-level Windows multimedia device API (MMDevice API). Note the interface IMMDeviceEnumerator, which you can use to retrieve the IMMDeviceCollection, i.e. each IMMDevice which contains properties such as friendly name, description, state etc.
http://msdn.microsoft.com/en-us/library/dd316556(v=VS.85).aspx

Nikola Gedelovski
- 1,000
- 6
- 12
-
Isn't that only for audio endpoint devices while i need to enumerate audio adapters? – clumpter Dec 13 '10 at 15:31
0
You can use DirectSound to enumerate sound devices. Take a look at this article.

Kirill V. Lyadvinsky
- 97,037
- 24
- 136
- 212
0
The simplest way i found is using WMI with this query "SELECT * FROM Win32_SoundDevice".

clumpter
- 1,898
- 6
- 27
- 38