All sound broken - ALSA underrun
So, I've had this problem ever since I upgraded to Xubuntu 9.10 and even after switching to Debian. (9.04 was fine.) Basically, all manner of sound is broken.
Using ALSA or Pulse, any program that plays sound will skip and stutter every few seconds. Imagine a CD you found in a parking lot. All display "ALSA underrun" in the terminal when this happens.
Using OSS, the skipping is less frequent (2-3 times per minute), but still enough to be a bother. Video is basically unwatchable as both mplayer and VLC will, in addition to the skipping problem, just stop playing sound entirely after between 1 and 30 minutes.
The amount of skipping depends largely on the file format. FLAC and OGG skip so badly they're almost unrecognizable. MP3 is not as bad, but still useless. WAV plays almost flawlessly, but skips more often under heavy CPU load. In all cases there also seems to be more skipping at some times than others (wait an hour, a day, etc and it'll be more, or less). It's as if the decoders are not getting enough CPU time.
All players exhibit the same behaviour: the progress jumps several seconds visually as the sound skips. So the problem has to be in decoding.
mpd would skip terribly even on OSS until adding this line to .mpdconf: with that it only skips a few times per minute, like other programs, but it's still bothersome, and with OSS nothing else can play sound at the same time. (Notably, the Flash player locks up the entire browser. -.-)
An even bigger issue comes with trying to watch any sort of video. VLC skips too (image is fine), displaying a message:
After a few minutes (between 1 and 30), VLC will stop playing sound entirely. mplayer (with video or just audio files) will freeze up and start repeating the last sample EXTREMELY LOUD. x.x
[0x876a810] alsa audio output error: cannot write: Broken pipe
Right now I'm on Debian Squeeze kernel 2.6.32-trunk-686, MPD version 15.8, ALSA version 1.0.21; single AMD Sempron CPU about 1600mhz; 1GB RAM which is about half full.
This has gone on for about a month and nobody seems to have any solution. Surely someone must know what's going on with this?