0

What's the best way to enumerate audio adapters (sound cards) in Windows Vista and above using WinAPI (C++)?

clumpter
  • 1,898
  • 6
  • 27
  • 38

3 Answers3

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
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