[Solved] [0.13.20] ~1 s audio delay in Linux
Posted: Sat Oct 22, 2016 5:38 pm
I have been experiencing an audio delay of about 1 s while playing. The solution suggested in the known issues thread didn’t work for me. However, I found an alternative workaround; I’m posting it here in case it helps others.
Instead of creating an /etc/allegro5rc file with the suggested configuration, I found out that putting audio through a Dmix device in ALSA solves the issue. This works both with ALSA or Pulseaudio as backend. For reference, this is my ALSA configuration:
I had this issue also with the latest experimental version (0.14.14), but haven’t tested this configuration on it.
Also of note, before applying this workaround, Factorio was the only program having sound issues on my system.
Edit: I’m running Arch Linux x86_64.
Edit: I have switched my audio configuration to rely on JACK (still exposing the Pulseaudio and ALSA frontends), and this also solves the issue.
Instead of creating an /etc/allegro5rc file with the suggested configuration, I found out that putting audio through a Dmix device in ALSA solves the issue. This works both with ALSA or Pulseaudio as backend. For reference, this is my ALSA configuration:
Code: Select all
# /etc/asound.conf
pcm.!default {
type plug
slave.pcm "mixer"
}
ctl.!default {
type hw
card 1
}
pcm.emu0404 {
type hw
card 1
device 0 # analog output
}
pcm.mixer {
type dmix
ipc_key 1024
slave {
pcm "emu0404"
format S24_3LE
rate 96000
period_time 0
period_size 1024
buffer_size 8192
}
bindings {
0 0
1 1
}
hint {
show on
description "Dmix before E-MU 0404 USB"
}
}
Also of note, before applying this workaround, Factorio was the only program having sound issues on my system.
Edit: I’m running Arch Linux x86_64.
Edit: I have switched my audio configuration to rely on JACK (still exposing the Pulseaudio and ALSA frontends), and this also solves the issue.