This project has moved and is read-only. For the latest updates, please go here.

Can I use naudio to play the same mp3 to 2 output devices at the same time?

Jun 19, 2016 at 1:43 PM

I have written a little "soundboard" app in visual studio that plays mp3 files triggered by button presses. Right now I'm simply using the System.Windows.Media MediaPlayer for that, so the sound is played using the currently selected sound output device in Windows. Now I would like to ALSO play the same sound (at the same time) to a second output device.

The reason is that I want to use the soundboard to play jingles, effects, etc. in a small quiz I do on a popular community Discord server. I have setup a Virtual Audio Cable (VAC) so that the Discord VoIP app takes the VAC output as its input device. The VAC has two input devices that it can mix, one of which is of course my microphone, and I want my WFP soundboard app to use the second VAC input as its output device (while at the same time also playing the sound using the default output device, so I can hear it in my headphones).

Can I use naudio to do that? If so, could you give me a little hint on how to start implementing this?

Thank you in advance!
Jun 25, 2016 at 4:57 PM
There's no built-in easy way at the moment. One option would be to have one device being fed from a BufferedWaveProvider, and then insert something into the signal chain going to the first device to always copy its data into that BufferedWaveProvider.