Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Underrun occurred" warnings when using ALSA audio driver #15

Open
thwill1000 opened this issue Jan 22, 2025 · 0 comments
Open

"Underrun occurred" warnings when using ALSA audio driver #15

thwill1000 opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@thwill1000
Copy link
Owner

When using the ALSA audio driver, i.e.

export SDL_AUDIODRIVER=alsa

warnings of this form are written to the console:

ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred

I believe this is occurring because the driver is requesting audio samples faster than the MMB4L code is providing them.

I think the solution to this problem is to increase the number of samples in audio_configure() (there is a TODO in the code to this effect) and make corresponding changes to audio_callback() and its sub-functions.

Reported by @Volhout, but also seen and put on the back-burner during original development.

@thwill1000 thwill1000 added the bug Something isn't working label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant