-
Notifications
You must be signed in to change notification settings - Fork 443
Description
So I have a music player application and I would like for the user to be able to select the audio output device.
The user could switch devices or unplug it in the middle of a track. So, I need to be able to rebuild the stream at any point.
However, I noticed, at least on macOS, that upon disconnecting a device (in this case my headphones), the audio gets automatically rerouted to another device all on its own. This is nice but now I no longer know what the current device actually is. Which means that my application state, which display the current device, is now out of sync.
Is there a way to turn off this feature, or is it something the OS does? Otherwise, is it possible to listen for a particular stream event? Or maybe just even be able to query the current output device given a particular stream?
Thanks.