View Full Version : 5.1.1 causing skips w/local playback

Scott Ludwig
2004-03-14, 01:23
Actually this problem was in 5.0.0 and 5.1.1 (didn't try 5.1.0).

Here's the scenario:

Debian Sid server only 2ghz machine, 256mb, nothing else running.
I'm running slimserver streaming to mpg321 on the same machine,
sound card output goes to stereo.

- start slim server, let it finish startup, including scanning and go idle
- start mpg321 http://localhost:9000/stream.mp3
- now play a song

result: every 5-7 seconds a skip of about 1/2 second

Every permutation of renicing doesn't solve the problem.

BUT: if I kill mpg321 and then start it again immediately, the skip goes
away and everything is fine. If I stop the music and then start it again,
the skip returns.

Looking at the mpg321 source, its buffer size is 1M. I'm guessing the
skip occurs when it is trying to refill the buffer. The amount of "reserve"
data in the buffer it leaves for audio playback while waiting for the
read() to complete isn't long enough and a skip occurs. What I can't
understand is why would the streaming behavior be different different
when mpg321 is restarted? (same result with mpg123 btw).

Of course I want no skipping :), that way I won't need to train my
spouse on how to use ssh!

Anyone with ideas and / or debugging tips? (developer-only tips are
fine too!)