In scenario 2 of this Audio Creation uwp project i noticed it capture audio from microphone and give output to selected output device in real time. So in this scenario i selected speaker as output device and start record so it start capture audio from microphone and give output to speakers even if my earphones is connected.
as shown in image it route audio to media instead of headphones
so similarly i want to route media, mp3,FM audio to speaker even if headset is connected.