Re: [ecasound] sample count of zero for LADSPA 'run' function

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Mon Sep 01 2008 - 23:41:06 EEST

On Mon, 1 Sep 2008, Sergei Steshenko wrote:

>> delay). And adding a
>> 'if (samples_count > 0)' is not necessarily a
>> good idea (performance> wise). And even if ecasound would filter these out, other
>
> But having the check in every plugin performance-wise is worse than
> having it just once in ecasound.

But even if the check was removed from ecasound, you'd still need it (as
other hosts might pass you zero sample buffers), so in the end it'd be
even worse. ;) And for most plugins, you can embed this check in the main
processing loop (i.e. 'for(i = 0; i < len; i++) foo;') with no extra cost
for the len==0 case.

Oh well, API development is tricky business. As this is not explicitly
discussed in LADSPA documentation, it might well be that some hosts are
filtering the zero buffers out, while some are not, leading to a full
layer of unnecessary runtime checks both in plugins and hosts, just
because some assumption was not written down.

--
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Tue Sep 2 00:15:06 2008

This archive was generated by hypermail 2.1.8 : Tue Sep 02 2008 - 00:15:06 EEST