[pulseaudio-discuss] Stuttering sound with SDL apps
CJ van den Berg
cj at vdbonline.com
Mon Mar 3 04:02:47 PST 2008
On Mon, Mar 03, 2008 at 09:06:32AM +0000, Colin Guthrie wrote:
> I'm trying to debug an issue in Mandriva with SDL apps stuttering a lot
> when outputting sound.
> We are using by default the SDL's pulse output layer, but this seems to
> cause significant issues. Using the ESD layer seems to be OK, but I'd
> obviously like to make direct pulse output work.
> Does anyone have any patches for SDL to fix this? I'd imagine it's a
> buffering/sample size thing and that SDL is trying to achieve low
> latency but is in actual fact starving PA. If we up the client side
> buffer size in SDL apps that support this (e.g. wesnoth), the problem
> goes away.
> Any other distros affected?
> Interestingly, when using the ASLA plugin via SDL the sound stutters in
> a similar way, but the UI in pavucontrol flashes around the relevant
> stream like it's constantly being torn down and reconnected. Skype also
> seems to do this. I've verified that the connection *is not* being
> dropped/reinitiated via paman, so perhaps it's constant tweakign
> something, (e.g. the volume or stream name or something?) that
> pavucontrol has to redraw the UI for? This could just be a simple bug in
> pavucontrol. Anyway, this is just an aside.
I don't know about SDL, but ALSA definitely has the same problem on
Debian. It seems, from reading the plug-in code, that the ALSA plug-in
drops the connection on every buffer under run. I don't know what the
purpose of that is supposed to be. It doesn't make much sense to me.
As a workaround, you can raise the minimum period size in the ALSA
plug-in. That prevents the stuttering in Skype and Ekiga, but doesn't
really fix the problem. It only makes it less likely.
The strange thing is though that Skype still creates thousands of
connections even with a larger period size (and no stuttering), so there
must be other reasons for the plug-in to drop the connection too, or I'm
missing something somewhere. Hmm, come to think of it, perhaps I only
raised the period size for the sink and not the source...
CJ van den Berg
mailto:cj at vdbonline.com
xmpp:cj at vdbonline.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the pulseaudio-discuss