简体   繁体   中英

How would I record to a wave file using NAudio with more than 2 channels?

I have been trying to record to a single wave file with more than 2 channels with NAudio and I keep getting an InvalidParameter calling waveInOpen. I figured that this has to do with the fact that im trying to record with more than 2 channels.

The error occurs when the WaveIn.StartRecording() is called when the channel count is more than 2. It works when the channels are mono and stereo.

Is there a way to call the waveInOpen function with parameters that are outside the range? Is there a way to edit the waveInOpen function to accept more than 2 channels?

Thanks for the help!

Quite often the soundcard drivers for your soundcard will not allow recording more than two channels. You could see if WasapiCapture can do it. Often the only sure way to get at all the channels is if your soundcard has an ASIO driver, and then you can use AsioOut

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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