[6243] in bugtraq
Re: x11amp playlist bug
daemon@ATHENA.MIT.EDU (Thomas Sailer)
Thu Mar 5 14:29:34 1998
Date: Thu, 5 Mar 1998 09:13:09 +0100
Reply-To: sailer@IFE.EE.ETHZ.CH
From: Thomas Sailer <sailer@IFE.EE.ETHZ.CH>
X-To: Ari Heitner <aheitner@TJHSST.EDU>
To: BUGTRAQ@NETSPACE.ORG
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...