[LAD] Plugin block length restrictions
Fons Adriaensen
fons at linuxaudio.org
Sun Oct 21 21:10:40 UTC 2012
On Sun, Oct 21, 2012 at 04:24:16PM -0400, David Robillard wrote:
> * Fixed and power of two can be difficult or impossible to implement,
> and are not useful, so hosts should not bother trying to implement
> either (except where it is trivial), and plugins should not expect
> them to.
Neither fixed nor power-of-2 are strictly required for zero-latency
convolution although they make it somewhat easier to implement. For
the simple reason that convolution is not a block processing algorithm
in the first place, even if the most efficient implementations use block
processing. The next N output samples depend only on the next N input
samples (and previous ones) for any value of N. So it is always possible
to allow a call to process() for an arbitrary N samples.
That does not mean that there are no real block processing algorithms,
which do not share the property mentioned above, and which require a
fixed M of input samples even to produce a single output sample. Not
because of the implementation but because of the nature of the algorithm
itself. For example most of the processing inside JAMIN is of that type,
as will be almost all algorithms that perform spectral processing, e.g.
time stretching, morphing, and the like.
Given that, claiming that fixed and power-of-2 block sizes are 'not
useful' is a mistake. And for real block-oriented algorithms, processing
a block is an atomic operation, and it would be futile to try and change
a parameter value anywhere except on a block boundary anyway.
Ciao,
--
FA
More information about the Linux-audio-dev
mailing list