1
votes

I have a 4 channel ogg and wav file, I want to play each channel separately, like filtering. I have a stereo speaker what I want is when I pick a channel-1 speaker will only play the audio of channel 1.

I tried to dig in Naudio but can't figure it out for this purpose.

Any help would be so appreciated.

Thank you.

1
Do you want to play each channel separately with panning as well?Brad
During playing audio, I just want to switch between channels like enable ch1, ch2 and disable ch3, ch4. Or disable three and enable one. Is it possible? I want to do it at runtime. Thanks.fartking
It's possible. You're going to want to mix your own output stream to have full control. There's probably a good framework for doing this... I don't know of one offhand.Brad
I hope I could find onefartking

1 Answers

1
votes

With NAudio, you can make use of the MultiplexingSampleProvider to route specific inputs to outputs. Read more about it here. This may meet your needs for multi-channel WAV playback.

NAudio does not currently include support for ogg playback, so you'd need to find an extension to do that (there are a few based on NVorbis).