如何使用NAudio库列出ASIO音频输出设备?
对于WaveIn,它将是:
int devcount = WaveIn.DeviceCount;
for (int c= 0; c < devcount; c++)
{
WaveInCapabilities info = WaveIn.GetCapabilities(c);
Console.Out.WriteLine("{0}, {1}", info.ProductName, info.Channels);
}
对于WASAPI,它将是:
MMDeviceEnumerator enumerator = new MMDeviceEnumerator();
foreach (MMDevice device in enumerator.EnumerateAudioEndPoints(DataFlow.Capture, DeviceState.All))
{
Console.WriteLine("{0}, {1}", device.FriendlyName, device.State);
}
答案 0 :(得分:1)
根据the implementation of the AsioOutSettingsPanel class,ASIO驱动程序名称用作设备名称。因此,可以使用AsioOut.GetDriverNames()
方法。