Search code examples
c#audionaudio

Output multiple audio to individual sound card channels


I have an eight channel sound card. 8 audio in and 8 audio out. When the driver for the sound card is installed, the following is shown on Playback devices.

  • Play 1-2
  • Play 3-4
  • Play 5-6
  • Play 7-8

I can enumerate all 4 devices (Play 1-2,Play 3-4) and play on each of them. The current situation only allows me to have 4 audio outputs. The sound card also has individual audio out wires/port for each channel.

What I want to do is to play on Play 1, Play 2, Play 3, etc. Is there any way to achieve this. I am currently using NAudio to enumerate and playback.


Solution

  • You can play two independent mono streams out of one of the stereo pairs using MultiplexingSampleProvider or MultiplexingWaveProvider. If you want to treat the whole soundcard as a single device, then I've found AsioOut tends to be the only option and again you can use the multiplexing providers to route individual NAudio wavestreams to the different device outputs.