1

我想从我的扬声器中捕捉声音,并Line 1使用NAudio或其他一些 API 在我的录音设备中播放它们。

我怎样才能做到这一点?

我可以列出WaveInWaveOut设备

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);
    }
}

但它们与我想要的完全相反。我可以用麦克风录音并用扬声器收听,但我想做相反的事情。如何?

4

0 回答 0