本文介绍了检测耳机何时插入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么方法可以通过编程方式确定耳机何时插入计算机?
Is there any way to determine, programmatically when headphones are plugged into the computer?
本质上,我只想编写一个简单的工具,除非插入耳机,否则它将使我的声音静音.这甚至可能吗?
Essentially, I just want to write a simple tool that will mute my sound unless headphones are plugged in. Is this even possible?
推荐答案在 Windows Vista 及更高版本中,您可以使用设备到达和移除通知并检索端点外形来确定您的音频解决方案的制造商是否考虑特定端点一个耳机".
In Windows Vista and beyond, you can use the device arrival and removal notifications and retrieve the endpoint formfactor to determine if the manufacturer of your audio solution considers a particular endpoint a "headphone".
在 Vista 之前,无法确定此信息.
Before Vista there was no way of determining this information.
更多推荐
检测耳机何时插入
发布评论