Re: [linux-audio-dev] LADSPA and run_adding()

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

Subject: Re: [linux-audio-dev] LADSPA and run_adding()
From: Kai Vehmanen (kaiv_AT_wakkanet.fi)
Date: Sat Nov 18 2000 - 16:44:57 EET


On Fri, 17 Nov 2000, Paul Barton-Davis wrote:

>>- read_from_file(a)
>>- plug1.run_inplace(a)
[...]
> >==> 1 buffer, N plugins, 1 chain
> This is not the scenario I am thinking of. Consider this:

This is just what I meant. For some cases (like above), run_adding()
wouldn't be any faster (if not the opposite), while in other it would be
optimal. So the questions are, a) which is more natural from interface
POV, run_replacing() or run_adding(), and b) which scenarios are more
common (weighted by their complexity -> no need to optimize simple
setups).

> read_from_sourceA(a);
> read_from_sourceB(b);
> read_from_sourceC(c);
> plug1.connect_port(0,busA);
> plug2.connect_port(0,busA);
> plug3.connect_port(0,busA);
> plug1.run(a);
> plug2.run(b);
> plug3.run(c);
> write_to_destinationN(busA);

Hmm, here you only one plugin per chain (plugins 1, 2 and 3 run in
parallel), and you use this to optimize the processing chain. What if you
had 10 plugins in the same chain? With only run_adding() available you'd
need 10 buffers, while with run_replacing() you only need 1! Of course you
could use 2 buffers, and bounce between them (plug1:a->b, mute(a),
plug2:b->a, mute(b), plug3:a->b, ..., plug10:a->busA), but I don't think
this is very elegant.

> Seriously, if you can explain how I can implement the example I give
> above without having to iterate over 3 output buffers, sum their
> contents and store the result in a 4th buffer, I'll be very grateful.

Unfortunately I can't. I agree that run_adding() is optimal in certain
situations, but I think run_replacing() is generally more usable. This is
why I think mandatory run_replacing() + optional run_adding() is the best
combination.

-- 
 . http://www.eca.cx ... [ audio software for linux ] /\ . 
 . http://www.eca.cx/aivastus ... [ aivastus net radio ] /\ . 


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

This archive was generated by hypermail 2b28 : Sat Nov 18 2000 - 17:11:15 EET