dheijl / swyh-rs

Stream What You Hear written in rust, inspired by SWYH.
MIT License
348 stars 15 forks source link

Changing audio output when connecting external monitor #138

Open techquestions opened 3 months ago

techquestions commented 3 months ago

I am connecting my laptop to a HifiBerry (Raspberry Pi) device running Volumio, using swyh-rs.

Sometimes, while it's connected to Volumio, I connect an external monitor to that laptop via USB → HDMI converter (just a detail, I believe just HDMI is important here). Then the audio output changes to that monitor, which has built-in speakers.

I would like to ask if this is (1) how Windows behaves or (2) is it a bug? If (1), could it be overriden by some setting of swyh-rs, so that the audio output always stays the same or it just outputs to both external monitor and Volumio (as it behaves when I connect Volumio just on my laptop, without an external monitor).

Please find the logs attached.

dheijl commented 3 months ago

I think that it is "normal" windows behaviour. Swyh-rs does not control windows sound, it just captures whatever sound Windows is playing on whatever device you, or in this case Windows, have chosen. Swyh-rs itself does not output any audio, it just captures it, and tries to stream it to dlna/upnp devices using http transport. That is also the reason that I advocate using vb-audio or vb hifi-audio as the windows audio output device for capture by swyh-rs, so that Windows does not interfere with it.