简体   繁体   English

监听麦克风变化

[英]Monitor microphone changes

Is there any way to monitor microphone changes (plug in and plug out events)? 有什么方法可以监视麦克风的变化(插入和插入事件)? Shouldn't matter if the mic is bluetooth / usb / or plugged directly to sound card. 麦克风是蓝牙/ usb /还是直接插入声卡都没关系。 Application is built with C# but if there isn't any good way to get the events using C# then C++/CLI might be also option. 应用程序是使用C#构建的,但是如果没有使用C#来获取事件的好方法,那么C ++ / CLI也可以选择。

This link may help: 此链接可能有帮助:

http://blogs.msdn.com/b/coding4fun/archive/2009/10/08/9905168.aspx http://blogs.msdn.com/b/coding4fun/archive/2009/10/08/9905168.aspx

The post includes instructions on capturing the microphone level, etc. 该帖子包含有关捕获麦克风电平的说明,等等。

Original post. 原始帖子。 Microphone Input 麦克风输入

EDIT: Blog moved here: https://channel9.msdn.com/coding4fun/articles/NET-Voice-Recorder 编辑:博客移到这里: https : //channel9.msdn.com/coding4fun/articles/NET-Voice-Recorder

I found also IMMNotificationClient from WASAPI which should work. 我还从WASAPI找到了IMMNotificationClient,它应该可以工作。 Seems NAudio is not exposing this, but after customization I'm able to use it and get plugin / plugout events. 看来NAudio没有公开这个,但是自定义后我可以使用它并获取插件/插件事件。 Although it doesn't seem really stable - duplicated events / missing events and etc. Is there any proper implementation example in managed level? 尽管它似乎不太稳定-事件重复/事件丢失等。在托管级别是否有适当的实现示例?

Interface description :: IMMNotificationClient interface 接口说明:: IMMNotificationClient接口

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM