本文介绍了c#中的MMDeviceEnumerator的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是MMDeviceEnumerator,它的重要性是什么?
在哪个名称空间我们可以找到它?
what is MMDeviceEnumerator,And what is importance of it?
In which name space we can find it?
推荐答案
#using NAudio.CoreAudioAPI
然后您可以使用以下内容枚举您的音频设备...
then you can enumerate your audio devices with the following...
var deviceEnum = new MMDeviceEnumerator();
var devices = deviceEnum.EnumerateAudioEndPoints(DataFlow.All, DeviceState.Active).ToList();
MMDeviceEnumerator定义如下:
The MMDeviceEnumerator is defined as follows:
/// <summary>
/// implements IMMDeviceEnumerator
/// </summary>
[ComImport, Guid("BCDE0395-E52F-467C-8E3D-C4579291692E")]
class MMDeviceEnumeratorComObject
{
}
如果你在注册表中查找GUID引用,它将在文件MMDevAPI.dll中实现
and if you look up the GUID reference in the registry, it is implemented in the file MMDevAPI.dll
这篇关于c#中的MMDeviceEnumerator的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!