[.15] Audio thread will loop if audio subsystem removed.

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
Paul17041993
Inserter
Inserter
Posts: 37
Joined: Fri Nov 25, 2016 4:26 am
Contact:

[.15] Audio thread will loop if audio subsystem removed.

Post by Paul17041993 »

In at least linux using the pulseaudio subsystem, if the audio subsystem is removed for some reason (eg; 'pulseaudio -k', which restarts it) factorio's audio thread will get caught in a loop, consuming an entire core until it's closed.

There's two things that we need for this;
- obviously the audio thread should handle this better, cant suggest much without looking at what code's already there though, I assume the audio-device-changed call-back is already implemented? (this isn't guaranteed to be called in this condition though)
- we need a way to reload the audio system in factorio. In minecraft for example you could either go to the resourcepack GUI and click 'done' and it'll reload, or you could use the F3 reload hotkey (there's several for different things to reload or modify)

Having to restart the entire game is quite irritating when you use steam cloud sync, as it'll lock out the game until it's finished uploading and it can also cause other issues. So this is of moderate importance...
posila
Factorio Staff
Factorio Staff
Posts: 5421
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [.15] Audio thread will loop if audio subsystem removed.

Post by posila »

Paul17041993 wrote:- obviously the audio thread should handle this better, cant suggest much without looking at what code's already there though, I assume the audio-device-changed call-back is already implemented? (this isn't guaranteed to be called in this condition though)
Hi, if you feel like it, you can take a look at the code here: https://github.com/liballeg/allegro5/tr ... dons/audio
Post Reply

Return to “Pending”