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...
[.15] Audio thread will loop if audio subsystem removed.
-
- Inserter
- Posts: 37
- Joined: Fri Nov 25, 2016 4:26 am
- Contact:
Re: [.15] Audio thread will loop if audio subsystem removed.
Hi, if you feel like it, you can take a look at the code here: https://github.com/liballeg/allegro5/tr ... dons/audioPaul17041993 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)