积极答复者
音视频设备变更的消息通知

问题
答案
全部回复
-
目前知道如何获取设备列表,但用户在插拔摄像头、麦克风、耳机等音视频设备时,窗口在哪里如何获取通知呢?求教具体方式,谢谢!
我是快乐的小鱼^_^
你好,
请问你是想获取音量变化时的通知吗?
DeviceTopology API 可以使用户在音量适配器拓扑中获取到音量控制器。
具体代码示例,请参看以下链接:
Fun with the endpoint volume interfaces - closing the loop
Getting volume change notifications on Vista/7 (C++)
至于如何获取设备列表, 请尝试以下函数或方法:
IMMDeviceEnumerator::GetDefaultAudioEndpoint method
相关代码,请参看 How to programmatically retrieve the name of default audio input device on Windows XP?
感谢您对本论坛的支持。We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.