Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Aug 2003 18:45:22 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        David Xu <davidxu@freebsd.org>
Cc:        threads@freebsd.org
Subject:   Re: Call for thread testers: XMMS
Message-ID:  <Pine.GSO.4.10.10308291830040.700-100000@pcnet5.pcnet.com>
In-Reply-To: <200308300605.45307.davidxu@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 30 Aug 2003, David Xu wrote:

> On Saturday 30 August 2003 01:38, Morten Rodal wrote:
> > On Thu, Aug 28, 2003 at 11:27:04AM +0200, Morten Rodal wrote:
> > > I have tried to run xmms with libkse on both a SMP (Dual P2 300MHz)
> > > and on my laptop (P4 1.7GHz).   Unfortunately I must report that the
> > > results are better with libc_r.
> > >
> > > When xmms starts to play any type of sound I can hear spikes and other
> > > distortions in the sound.  This happens regardless of the load of the
> > > machine, and it does not help to increase the buffer size.  However,
> > > after a while the spikes get less frequent.
> > >
> > > I will try libthr when I get home later today and see if it works
> > > better than libkse.
> >
> > I am happy(?) to report that the clicks, spikes and other digital
> > noises are still present using libc_r.  After careful listening I can
> > still occationaly hear them, but not nearly as frequent as with libkse
> > or libthr.
> >
> > Someone on current@ have reported problems with sound, so it might not
> > be threading related after all.  Now all I have to do is get Mozilla
> > Firebird working with libkse and I'm all set :)
> 
> Note that I ever had the same problem as yours, but with lastest sound
> and pcm driver change in kernel, I rarely have the problem.
> also click and other problems in XMMS may be resulted by its timing code,
> I ever worked on a DVD player project and the project leader told
> me timing code in DVD Player is very diffcult to get it right on a time
> sharing system, something like nanosleep() won't works well in such system 
> especially when you have several threads, this might be true, and can be
> applied to XMMS too, because libkse and libthr are true threading
> libraries, this may also explore some XMMS timing code problem.

I have built xmms and have tried playing an mp3 and can hear the
same "scratches".  I think it is a problem in the way that xmms
uses threading (feeding the audio device).  I don't experience this
problem with ogle playing DVDs, which is also multi-threaded.

Using top, it looks like xmms has one thread that is always running.
One of the other threads is always lower on the top totem pole, and
this is the thread that is in pcmwr.  Since I see these threads in
top, they must be created as scope system threads, so any priority
they have is ignored by the kernel.  It might be interesting to
see how xmms fares if its threads were created as scope process.

-- 
Dan Eischen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10308291830040.700-100000>