枚举 WinAPI 中的音频适配器

发布于 2024-10-08 00:31:59 字数 65 浏览 5 评论 0原文

在 Windows Vista 及更高版本中使用 WinAPI (C++) 枚举音频适配器(声卡)的最佳方法是什么?

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

少女情怀诗 2024-10-15 00:31:59

我会选择较低级别的 Windows 多媒体设备 API (MMDevice API)。请注意 IMMDeviceEnumerator 接口,您可以使用它来检索 IMMDeviceCollection,即每个包含友好名称、描述、状态等属性的 IMMDevice。

http://msdn.microsoft.com/en-us/library/dd316556(v=VS.85).aspx

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

乞讨 2024-10-15 00:31:59

您可以使用 DirectSound 枚举声音设备。请查看本文

You can use DirectSound to enumerate sound devices. Take a look at this article.

请持续率性 2024-10-15 00:31:59

我发现的最简单的方法是使用 WMI 和此查询“SELECT * FROM Win32_SoundDevice”。

The simplest way i found is using WMI with this query "SELECT * FROM Win32_SoundDevice".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文