sillyfly wrote:Could you try the solution (second to last topic)
here?
Could be related, although when I had this delay problem there was no audible distortion.
Did not work for me, but I might have done something wrong? I created the file in /etc/ and tried launching the game from terminal with padsp but sound would not play at all, just got a error message.
Edit: just tried launching the game with spotify playing music. The instant factorio starts loading, the music gets distorted.
Edit: Playing individual files straight from the factorio directory works without problems using VLC media player.
Edit: Tried launching the game again with spotify playing, distortion started as soon as the game started loading, but stopped before reaching main menu. Loaded a save, stopped spotify, and could play without sound distortion. Will try this a few more times..
Edit: No luck, have tried multiple more times to start the game, with and without spotify playing, reboot etc.. distortion still happens.
Edit: Fixed it.
From Askubuntu.com I found this tip through a google search:
This one helped me: [Static and crackling in my HDMI audio?]: Static and crackling in my HDMI audio?
edit
/etc/pulse/default.pa
look for
load-module module-udev-detect
add tsched=0
load-module module-udev-detect tsched=0
reboot
I have no idea what the tsched=0 does, but I have tried launching Factorio multiple times now, with and without spotify, and there is no distortion anymore.
From arclinux forums:
tsched=0 disables PulseAudio's timer-based scheduling and uses the classic interrupt-driven approach. Timer-based scheduling allows for better latency management and reduced CPU usage. It puts very strict requirements on the ALSA drivers. Unfortunately, some drivers do not handle it well.
And further down that thread there was a guy mentioning this:
This is a very dirty workaround that bypasses PulseAudio's scheduling mechanisms in favor of the traditional interrupt approach. Use with caution.
But alas, now it seems to work for me. There seems to be slight delay in the playback of sound effects, but it's only by a few milliseconds and barely noticeable.