Re: [alsa-devel] Re: [linux-audio-dev] laaga, round 2

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [alsa-devel] Re: [linux-audio-dev] laaga, round 2
From: Jim Peters (jim_AT_uazu.net)
Date: Tue May 15 2001 - 16:25:40 EEST


Steve Harris wrote:
> On Mon, May 14, 2001 at 05:02:04PM -0700, Tom Pincince wrote:
> > I see why you resist busses. I also see that you view signal flow as a
> > push process. I view audio as being pulled through the signal path (no
> > ego). The difference may prove to be profound. In a pull model the
> > plugin doesn't write to any busses, the plugin just presents its outputs
> > and the busses read from the plugins. This is what you want.
>
> Is it? There are performance gains to be had from letting the plugin write
> to the busses. c.f. long discussions of run_adding v's run_replacing.

Taking the simplest approach, the cost would be the same as in Paul's
model. In AES the plugin writes to its own internal buffer, and then
calls write_channel() for each of the busses it needs to add to. If
instead we give the plugin a buffer to write to, then we (as the
server) can do the writing to busses for the plugin. This is exactly
the same amount of copying, but it gives the advantage of enabling
this `pull'-oriented model.

This can be optimised further in a few special cases of connections
with gain==1.0, cutting out an additional copying step, but what
exactly we can optimise depends on whether we choose run()-style or
run_adding()-style for our plugin outputs. This optimisation makes no
difference to how the plugin behaves, because all it has to do is
write to the buffer it has been given.

Jim

-- 
 Jim Peters                  (_)/=\~/_(_)                        Uazú
                          (_)  /=\  ~/_  (_)
 jim@                  (_)    /=\    ~/_    (_)                  www.
 uazu.net           (_) ____ /=\ ____ ~/_ ____ (_)           uazu.net


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue May 15 2001 - 16:56:19 EEST