Re: x11amp playlist bug

Thomas Sailer (sailer@IFE.EE.ETHZ.CH)
Thu, 05 Mar 1998 09:13:09 +0100

Ari Heitner wrote:

> I installed x11amp w/o making it setuid, it's perms are
> -rwxr-xr-x 1 root root 623456 Feb 23 13:33 x11amp*
> it works very nicely. I don't know why the x11amp people would recommend
> setuiding it to root, except that this may avoid access problems writing
> to /dev/dsp.

I don't know x11amp (yet), but the soundcard access code I
put into amp uses root privs to mlock itself into memory and
set itself (sched_setscheduler(SCHED_RR)) to rt prio.
That way, I can get away with very low buffer space and I can
stuff the decoded samples directly into the DMA buffer of the
soundcard. This makes it possible to run AMP on a heavily loaded
machine without audible effects.

I think there's a fallback to the old code that just uses
a rather big audio buffer between the decoder and the sound driver.
Obviously, this won't work well on a heavily loaded machine.

Tom

NB: I thought I have been rather careful in giving up root
perms as soon as possible, but maybe I've missed something...