Homepage Forums RetroPie Project Everything else related to the RetroPie Project ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred Reply To: ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred

#97108
labelwhore
Participant

I can speak to this on a high level. I’m somewhat of a digital audio expert. However, I’m a linux noob.

The problem is, as the error states with the memory buffer for processing audio. Information isn’t being processed from that buffer fast enough to add anything else to it. Theoretically, there are two ways to fix it; increase the amount of memory allocated to the audio buffer, or reduce the amount of data flowing into it. The simple solution is the second option. We can easily do that by cutting the audio bit rate in half.

instead of this:

audio_out_rate=44100
audio_driver=sdl

do this:

audio_out_rate=22050
audio_driver=sdl

you could also try this:

audio_out_rate=24000
audio_driver=sdl

These are industry standard bit rates, try to stick to them or you may end up with strange audio artifacts or changes in pitch for music and sound effects.