sdl2-compat icon indicating copy to clipboard operation
sdl2-compat copied to clipboard

Compat layer not tracking default sound device properly in pipewire

Open MAHBOD-85 opened this issue 11 months ago • 6 comments

this issue can be reproduced in furnace chiptune tracker using sdl backend

reproduction steps: open furnace (my device is an HP Victus-15 fb2082wm laptop) make sure you are using sdl backend plug a headphone in

Expected result (as seen in sdl2): device auto switches

Actual result: sound stops and you have to specify device manually instead of the option after refreshing the audio options menu a couple of times by clicking an option and then apply to even make it show up

MAHBOD-85 avatar Feb 09 '25 17:02 MAHBOD-85

This reproduces for me here, I'm looking into it.

icculus avatar Feb 24 '25 16:02 icculus

Wait, this doesn't reproduce for me, after all...it's just choosing a wrong default device at the system level (in my case, "Built-in Audio Digital Stereo (IEC958)", which doesn't have anything plugged into it, instead of the HDMI port, but appears to have migrated to it and played audio on it. When I plugged the USB headphones back in, it jumps correctly back to it.

Can you confirm that isn't what's happening to you? When it fails to play when headphones are plugged in, did the system actually switch to it? (the "Output Device" part in this screenshot...)

Image

I'm assuming you're using <System default> for the device in Furnace. If you're not, I'm totally researching the wrong thing here.

Image

icculus avatar Feb 24 '25 22:02 icculus

pipewire itself does switch to the proper device, the SDL2 app (furnace in this case) doesn't

MAHBOD-85 avatar Feb 25 '25 00:02 MAHBOD-85

And furnace is definitely trying <System default>, right?

icculus avatar Feb 25 '25 00:02 icculus

yes

MAHBOD-85 avatar Feb 25 '25 04:02 MAHBOD-85

This still doesn't reproduce for me, but it's possible https://github.com/libsdl-org/SDL/commit/4c035a1fd8d00a9d364d175f88af1fef0c6c5d66 will fix (or workaround) the problem.

icculus avatar Mar 27 '25 18:03 icculus

this issue seems to have been fixed now

MAHBOD-85 avatar Jun 01 '25 23:06 MAHBOD-85