Skip to content
Discussion options

You must be logged in to vote

Hi!

Sorry for the late reply!
The OutputDeviceChanged event only responds to changes in the number of output devices (when the device is disconnected or reconnected).
Device switching is not monitored by the audio engine at the OS level.
Device switching must be done in code.

// The engine must be stopped
await Task.Run(() => engine.Stop());

int result = engine.SetOutputDeviceByName("Headphones");
// -2 = still running, -3 = not found

engine.Start();

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BlackCoyote
Comment options

Answer selected by BlackCoyote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants