Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to prevent WasapiOut to change Device when soundouput changes #482

Open
steam3d opened this issue Sep 20, 2023 · 0 comments
Open

How to prevent WasapiOut to change Device when soundouput changes #482

steam3d opened this issue Sep 20, 2023 · 0 comments

Comments

@steam3d
Copy link

steam3d commented Sep 20, 2023

I got strange behaviour. I setup the WasapiOut like this:

_soundOut = new WasapiOut() { Latency = 100, Device = device};

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:

_soundOut = new WasapiOut() { Latency = 100, Device = device, StreamRoutingOptions = StreamRoutingOptions.Disabled};

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 the device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant