[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Arts occupies sound device
From:       Stefan Westerfeld <stefan () space ! twc ! de>
Date:       2000-04-10 17:07:19
[Download RAW message or body]

   Hi!

On Mon, Apr 10, 2000 at 10:21:02AM +0200, Stefan Taferner wrote:
> On Fri, 07 Apr 2000, Bernhard Rosenkraenzer wrote:
> > On Fri, 7 Apr 2000, Stefan Westerfeld wrote:
> > > > Is there a chance that artsd could only occupy the device if really
> > > > needed? Or even better that it can share the sound device with legacy
> > > > apps?
> > > > IMO we have to find some way around here, as we canīt expect apps like
> > > > the real player to become arts aware.
> > >
> > > First of all: why can they not become aRts aware?
> >
> > Waiting for that would be stupid - it would shut out everything that
> > doesn't get ported, and I don't think any of the gnome-* packages will be
> > ported to aRts anytime soon (yet we must be able to run them in KDE).
> 
> Yes.
> 
> IMO artsd should close the sound device(s) when it is idle.
> Maybe similar to it's new suspend ability, but with a shorter timeout?

Suspend is meant to achieve exactly this.

Arts does close the devices upon suspend. The suspend timeout is just a
number, which is currently 60 seconds (which is probably large enough to
be safe in almost any circumstances).

You can also set it to 200 ms by changing one line of code, if you like.
However, there are currently good reasons for not choosing to too small
values. Suppose you have

  sample -> reverb -> soundcard

The reverb and soundcard module are suspendable. Thus, if the sample quits,
and your timeout is 200ms, the suspend would kick in after 200 ms. However,
the reverb fadeout may be more than 200ms, thus, you may end up with cutting
the outfading reverb with an audible *plop*, and if you desuspend again, you
have a *plop* again, and the rest of the reverb.

With some amount of coding, this is of course not unfixable. You could do
things like look what data is actually in the ringbuffers between the modules,
and only suspend if that has reached some constant value... but the code
for that isn't there (yet?). As I said: AutoSuspend is still young.

   Cu... Stefan
-- 
  -* Stefan Westerfeld, stefan@space.twc.de (PGP!), Hamburg/Germany
     KDE Developer, project infos at http://space.twc.de/~stefan/kde *-

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic