[Linux] Title screen spams ALSA underflow errors to the console.
For example:
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
This makes it difficult to see the debug messages.
I assume this happens because you opened the sound device but don't play any sound on the title screen.
Comments (4)
-
reporter -
Yep, i've observed this before - your suspicion about inappropriate buffer sizes may be correct. We're not specifying buffer size manually right now, just leaving it up to PortAudio to use the system defaults. Will need to experiment with a few different settings. I'll put together a custom debug build for you to test soon that'll report what buffer sizes it assigns (and other output info) which should help us diagnose the issue precisely.
It should be noted tht the alsa lib spam isn't from our own code, and potentially is the cause of the stuttering in case it occurs inside the interrupt loop (which is called at 44khz, so any IO will put it behind schedule). Will need to see about suppressing the output, in any case.
-
Just a thought - are you using pulseaudio? You may need to call the game via the pasuspender utility as that can interfere with alsa in some cases.
-
- changed status to resolved
Confirmed this is a known issue that's a Pulseaudio conflict. The correct workaround is to execute the binary with pasuspender, as in ```pasuspender AdvertCity_Linux"
- Log in to comment
This actually happens during the game sometimes, and the sound becomes distorted. This is a symptom of incorrect ALSA usage, most likely too short buffers.