Is it possible to play a sound on a playback device that is not set as default playback device? I need to play multiple files simultaniously trough multiple output devices.
Does anyone knows a solution for .net? (C#)
Thanks!
well I was playing around with similar issue.
find out CreateWaveOut() method. This is where you should select your playbackdevice. for example:
MMDevice device = new MMDeviceEnumerator()
.EnumerateAudioEndPoints(DataFlow.Render, DeviceState.All)
.FirstOrDefault(d => d.ID == "yourplaybackdeviceid");
IWavePlayer waveOut = new WasapiOut(device, AudioClientShareMode.Shared, false, latency);
Download the naudio library from sourcecode tab not from Download->Release, it's not very actual and it's little buggy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With