An advanced audio library, written in C#. Provides tons of features. From playing/recording audio to decoding/encoding audio streams/files to processing audio data in realtime (e.g. applying custom effects during playback, create visualizations,...). The possibilities are nearly unlimited.
Other
2.14k
stars
450
forks
source link
How to prevent WasapiOut to change Device when soundouput changes #482
if device selects as current playback device (DefaultDevice) then when I switch device to another device. The audio will follow to another device and will be played there. But if device selects as not current playback device then when I switch device to another device. The audio will not follow to another device and will not be played there instead of this it will played at the device.
So I found option StreamRoutingOptions = StreamRoutingOptions.Disabled and changed WaspiOut like this:
I got strange behaviour. I setup the WasapiOut like this:
if
device
selects as current playback device (DefaultDevice) then when I switchdevice
to another device. The audio will follow to another device and will be played there. But if device selects as not current playback device then when I switchdevice
to another device. The audio will not follow to another device and will not be played there instead of this it will played at the device.So I found option
StreamRoutingOptions = StreamRoutingOptions.Disabled
and changed WaspiOut like this:And again I have the same behavior as I described above.
So how can I prevent switching
device
when user change sound out? I want to play audio only on thedevice
.