TL;DR: When playing audio using Windows UWP MediaPlayer, how do I route audio to a specific audio device/endpoint?
Full Context
I'm working on an app to place calls. Some requirements are:
- Play audio sounds at different points (e.g. when the call hangs up)
- Allow users to change in-call audio output to different endpoints (not an issue)
- Ensure that when in-call audio has routed to a different "default" endpoint, that any other sounds that are played are routed to the same endpoint (this is what I need help with)
Currently, when I route audio to a different endpoint, other sounds that are played with Windows UWP MediaPlayer do not get routed to the same "new" endpoint. This makes sense since we aren't changing application-wide settings.
My question is: How do I route audio to the same endpoint that the call audio is going through, given that I'm using Windows UWP MediaPlayer and given that I can get device information?