我想从扬声器中捕捉声音并使用Line 1
或其他API在我的录音设备NAudio
中播放。
我该怎么做?
我可以使用
列出WaveIn
和WaveOut
设备
public void ListDevices()
{
Console.WriteLine(" WaveIn devices ");
int waveInDevices = WaveInEvent.DeviceCount;
for (int i = 0; i < waveInDevices; i++)
{
WaveInCapabilities deviceInfo = WaveInEvent.GetCapabilities(i);
Console.WriteLine("Device {0}: {1}, {2} channels", i, deviceInfo.ProductName, deviceInfo.Channels);
}
Console.WriteLine(" WaveOut devices ");
int waveOutDevices = WaveOut.DeviceCount;
for (int i = 0; i < waveOutDevices; i++)
{
WaveOutCapabilities deviceInfo = WaveOut.GetCapabilities(i);
Console.WriteLine("Device {0}: {1}, {2} channels", i, deviceInfo.ProductName, deviceInfo.Channels);
}
}
但它们与我想要的完全相反。我能够从麦克风录制并在我的扬声器上收听,但我想做相反的事情。怎么样?