Re: [pygame] Pygame causes ALSA underrun

2021-08-26 Thread David Scheele
Ok thanks for the answers guys. I tinkered around a little. As Thomas said, the buffer size impacts this problem. First of all I was loading some 160mb .wav files with a length of up to 15 minutes into the channel. That obviously puts a lot of stress on the machine. When I upped the buffer size it

Re: [pygame] Pygame causes ALSA underrun

2021-08-26 Thread Thomas Kluyver
The docs for pygame.mixer.init() have this info, which seems relevant: > The buffer argument controls the number of internal samples used in the sound mixer. The default value should work for most cases. It can be lowered to reduce latency, but sound dropout may occur. It can be raised to larger v

Re: [pygame] Pygame causes ALSA underrun

2021-08-26 Thread BW
I had the same results with the Rpi architecture. They need to fix the kernel and/or audio driver. The underrun happens when you  push the CPU too hard, and the audio device (seems to) expect there is audio data but there is none in the audio buffer. I imagine it's a race condition that occurs

[pygame] Pygame causes ALSA underrun

2021-08-26 Thread David Scheele
Hi there, new to the mailing list. I'm currently misusing pygame and its mixer to create a raspberry pi script that can switch between different music playlists and play sfx on command, all without any graphics. So far it worked perfectly but now, in reach of the finish line, I came across errors l