Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
When I play sound in any application, it skips/stutters and a message such as "ALSA underrun" is displayed in the terminal. (Exact message depends on the program, but all say this.) Some songs skip more than others.
MPD was stuttering really badly, until I added a line to the audio_output section of .mpdconf:
With that, it still isn't perfect, but at least goes a few minutes as opposed to a few seconds without glitching.
Google shows all sorts of people having this problem with older versions of everything, but not the latest. MPD is version 15.8, kernel is 2.6.32-trunk-686 (squeeze), ALSA version 1.0.21.
Well it's now skipping every few seconds, which makes trying to actually enjoy music an exercise in futility. Is there really nobody out there who also has this problem and/or knows what to do about it?
Well, I've switched MPD to use OSS, and even it skips on occasion. Rare enough not to be much of a bother, but still odd. What could cause OSS, ALSA and Pulse to all skip random different amounts in different songs?
Well, OSS on Linux is just a compatibility layer for ALSA(hence the lack of change); I'm not sure how Pulse interacts with the sound system. What bitrate of audio are you trying to play and how fast is your computer? A preemtable kernel might be what you need.
Ludwig von Mises wrote:The elite should be supreme by virtue of persuasion, not by the assistance of firing squads.
CPU speed is around 1600mhz, single core AMD Sempron.
Was there a change in the kernel recently? I had the same problem on Xubuntu before switching to Debian, and trying older kernels didn't help.
Strangely, today, it seems to have improved a lot. There's still the odd skip, but it's not accompanied by an error message. Only change I can think of is turning off another computer... difference in network traffic? O.o mpd still skips badly on ALSA, with the underrun message, but mplayer works much better (skip maybe every couple minutes).
It does skip a lot worse on FLACs (bitrate in the range of 1152kb/s), so I would guess there's some relation there. Maybe mpd's process priority is too low? My client doesn't display bitrate information, so I can't tell, but I suspect VBR MP3s would skip in the more complex parts. That's what the FLACs seem to be doing as well. Nearly all songs are 44khz stereo (some might be 48khz, a few maybe 22khz).
OGG skips badly as well, so I'm starting to think the decoder is not getting enough CPU time.
I believe Pulse installs some "dummy" ALSA libraries that redirect to it, but I don't know for sure how it works. I've completely removed it (apt-get purge), and the problems existed before installing it. I will want to try to make it work later, but first things first.
The problem could very well be related to the soundcard/codec hardware of your system.
Try to play any wave file using aplay
aplay -v some_file.wav
Currently alsa is the only hardware driver supported in kernel.
Every other sound system including oss, jack, pulseaudio etc. uses alsa driver
Some hardware may not play audio other than its native speed very well. Normally sound cards have a native speed of either 44100Hz or 48000Hz stereo. So try to play either of the two.
I'm not sure how Pulse interacts with the sound system.
For the most part, `play` and `aplay` play WAV files OK, but under heavy CPU load, they too skip and display an underrun message. (aplay claims "at least 1763646400.046 ms long", which I'd have to say is wrong...)
I found today that with the above changes, mplayer plays video flawlessly. However, something I hadn't tried before: streaming music in MPD plays fine for 4 minutes, then starts skipping as badly as before. Since it can't actually skip ahead in a stream, it basically just cuts out and repeats a lot. I haven't yet tried streams in other players.