Change of audio output device breaks audio until game restart
Description
Probably an engine issue but i will include it here to be safe, have tried producing only on windows and will try other platforms. Had times where i needed to reconnect my headphones, which causes windows to change the output and lose audio from the game until it is restarted Reproduction
- Have the game open
- Disconnect your audio device. Wired or Wireless works
- Reconnect and observe loss of audio until game restart
Reproducing on
Can
- Windows 10/11
- Linux mint (unknown audio server, pulseaudio?)
- Ubuntu with pulseaudio
Can't
- MacOS Ventura 13.1 (M1 MacBook Air)
- Linux Distro with Pipewire (0.3.64, linux 6.1.0)
I have been having this issue as well. And you don't actually have to restart the game. You can go back to the server browser and reconnect and you will have audio again. At least in my experience. I am running the game on Linux mint
I have been having this issue as well. And you don't actually have to restart the game. You can go back to the server browser and reconnect and you will have audio again. At least in my experience. I am running the game on Linux mint
Yeah that's restarting the game
The server browser and client are different programs technically
Also cant reproduce on MacOS Ventura 13.1 (M1 MacBook Air)
cant reproduce on pipewire 0.3.64, linux 6.1.0
Semi-related but I have a branch that adds preliminary audio device changing support, main work outstanding is reloading clyde audio buffers upon changing device as OpenAL doesn't let you re-use contexts across devices.
Semi-related but I have a branch that adds preliminary audio device changing support, main work outstanding is reloading clyde audio buffers upon changing device as OpenAL doesn't let you re-use contexts across devices.
I had given this a hand myself, what I found out is that some audio returns, everything else reported invalidvalue errors and positional audio did not work right. To be honest I had no idea what I was doing then though and this was before the audio rework
Apparently openal-soft is supposed to have a change audio device thing you can call. But I can't hey it to show up on our thing
Apparently openal-soft is supposed to have a change audio device thing you can call. But I can't hey it to show up on our thing
If you pass the null device you can get devices via the extensions, the issue is none of the handles in clyde or via sources are valid anymore and need remaking for the new device.
With that being said I haven't tested the dedicated method they added recently but ideally that would work.
Okay looks like ALC_SOFT_reopen_device isn't implemented on 1.20.1 which is what we use so I wasn't high and OpenAL would need an update if we were to go this route.
Yeah it's what I thought. How hard is it upgrading openal? Worth it?
Letting openal handle it sounds the best
Reproduced on Ubuntu 22.04, with pulseaudio 15.99.1, but only on the zip release. This doesn't happen with the flatpak.
Hopefully this will save someone some digging in the future: the branch metalgearsloth was probably talking about for changing the audio device was this: https://github.com/metalgearsloth/RobustToolbox/compare/2023-12-19-audio / https://github.com/space-wizards/RobustToolbox/commit/c50054328b90ff2567f6ba422de642a46d13fdc6
I will also mention that I'm unable to change the game's output device through tools like the Plasma audio widgets or PAVU without restarting the game - possibly related? Running Pipewire.