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

From: Sergei Steshenko <sergstesh@email-addr-hidden>
Date: Mon Sep 01 2008 - 23:41:36 EEST

--- On Mon, 9/1/08, Kai Vehmanen <kvehmanen@email-addr-hidden> wrote:

> From: Kai Vehmanen <kvehmanen@email-addr-hidden>
> Subject: Re: [ecasound] sample count of zero for LADSPA 'run' function
> To: "Sergei Steshenko" <sergstesh@email-addr-hidden>
> Cc: ecasound-list@email-addr-hidden
> Date: Monday, September 1, 2008, 1:41 PM
> 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.
> --


in this thread I never used the word "bug". Actually, formally speaking,
the bug was in my code because indeed LADSPA does not explicitly
prohibit sample count of 0.

My point is consistency. I find it alarming that ecasound being fed the
same input sets or does not set sample count to 0 depending on destination.

IMO healthy code should behave the same in bot cases - that's all.



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
Ecasound-list mailing 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