Windows Game does not respect sound device changes

amorek

Greenhorn
When I turn on the game and then connect my Bluetooth headphones (order is relevant), the game will use laptop's speaker until it's restarted. It does not respect that Window's default audio device has changed to the headphones. I know other games are respecting default device setting and would switch the sound to headphones.


Windows 11
v1.6.15 build 24356
English
Single Player
Save game irrelevant to the issue
 
I am also experiencing this issue on Windows 11. Changed my default speakers to the output I wanted, checked Steam output and made sure it was on the speakers I needed, and Stardew audio still won't change over.
 
Same issue here: v1.6.15 build 24356, Windows 11, USB headset. Root cause, for the devs: since 1.6.9 the game uses OpenAL Soft (bundled soft_oal.dll 1.23.1). When the output device is removed or the Windows default changes, the ALC device stays disconnected / on the old endpoint forever. OpenAL Soft 1.23.1 already supports ALC_SOFT_reopen_device: I confirmed that calling alcReopenDeviceSOFT(device, NULL, NULL) on the game's device (alcGetContextsDevice(alcGetCurrentContext())) while the game is running restores audio immediately on the current default device. Suggested fix: listen for ALC_SOFT_system_events (DEFAULT_DEVICE_CHANGED / DEVICE_REMOVED) or poll ALC_CONNECTED, then call alcReopenDeviceSOFT. Until then, TheAnkulai's mod (Stardew Audio Device Refresh, Nexus 46027) uses the same approach and works as a workaround. Thanks TheAnkulai!
 
Back
Top