Windows 核心音频 API GUID
我正在使用 Windows Core Audio API 的实现,特别是 IMMDevice 接口,其代码可以在 此处。我使用此代码的目标是获取特定声音设备的友好名称。
该代码似乎实现了此类功能,但是友好名称的属性实际上似乎返回了 MSDN 文档 指的是“设备描述”。深入研究代码将我带到定义 GUID 的 PKEY 类。仅通过查看代码和 MSDN 文档,GUID 似乎是操作系统识别的预定义值,用于表示该设备的属性存储中的属性。因此,我此时的假设是,原始程序员打算定义友好名称属性,但错误地提供了设备描述的 GUID。我想扩展/更正此 API 以提供设备描述和友好名称。
这就是我遇到麻烦的地方。我找不到这些 GUID 的任何参考。我仔细研究了我能找到的所有文档,但根本找不到任何此类参考资料。我正在寻找有人告诉我我对这些 GUID 的假设是错误的并让我走上正确的轨道,或者是否正确地向我指出对它们的引用。我确信我错过了有用和关键的细节,所以如果需要更多信息,请告诉我,我会提供我能提供的信息。提前致谢!
I'm using an implementation of the Windows Core Audio API, specifically the IMMDevice interface, the code for which can be found here. My goal in using this code is to pull the friendly name of a particular sound device.
The code appears to implement such functionality, however the property for the friendly name really appears to be returning what the MSDN documentation refers to as the "Device Description". Drilling down into the code takes me to a PKEY class that defines a GUID. The GUID, based on simply looking at the code and MSDN documentation, appears to be a predefined value that the OS recognizes to represent a property in the property store for that device. So, my assumption at this point is that the original programmer intended to define the friendly name property, but provided the GUID for device description by mistake. I'd like to extend/correct this API to provide both the device description and the friendly name.
Here is where I run into trouble. I cannot find any sort of reference for these GUID's. I've pored over all the documentation I could find and simply cannot locate any such reference. I'm looking for someone to tell me my assumption about these GUID's is wrong and set me on the right track, or if it is correct to point me to a reference to them. I'm sure I've missed useful and critical details, so if more info is needed just let me know and I'll provide what I can. Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论