Quick answer: Pygame audio crackling after many pause/resume cycles? Audio buffer fragmentation; periodic reinit clears.

Long session with frequent pauses; audio quality degrades over time.

Reinit periodically

pygame.mixer.quit()
pygame.mixer.init()

Reset audio subsystem. Fresh buffers; crack-free.

Or use longer buffer

Init with buffer=4096. Less crackling vulnerability; more latency.

Profile per-session degradation

Audio buffer state visible in debug. Drift surface; reset before perceptible.

“Audio buffers degrade with cycles. Reset clears the degradation.”

If your game has frequent pause cycles, the periodic reinit is the safe pattern. Schedule per N pauses.

Related reading