Paul Davis wrote:

>>as a completely different issue, is there a way to indicate if a 
>>non-audio port is an array (instead of a single value), 
>>
>not possible.
>
>this is "ladSpa": Linux Audio Development SIMPLE Plugin Architecture
>
sigh, I knew these question would not yield any constructive answer. 
simple is a rather subjective term and that very much depends on 
personal preference. I did read through the ladspa header file before 
posting those questions, and I knew some of the feature that I asked 
might require extensions to the existing API.

>>clean way to define the size of this control data array that is not the 
>>same size as SampleCount? Also, what happens if the audio input port and 
>>audio output port are different sizes, say in the case of a 
>>time-stretching plugin?
>>
>not possible. that never happens in *any* plugin API that i'm aware
>of. the plugin's duty is to work on/with nframes of data and that
>includes generating that many at its output ports. it can never
>generate more or less, whether its doing time-stretching or not.
>
if this has been discussed before (i apparently missed it), then i won't 
go over it again. but i just want to say one can indicate that a port is 
an array by applying another flag just like LADSPA_PORT_*, let's say 
LADSPA_PORT_ARRAY for the time being. Of course we may specify that 
LADSPA_PORT_AUDIO also implies LADSPA_PORT_ARRAY, but we don't have to. 
In my opinion these are not too complicated changes. there are always 
other ways to define the size of this array on top of the existing API, 
but since I don't think this proposal stirs much public interest, i 
won't elaborate.

you mentioned that you have never seen any plugin that outputs a 
different number of samples than inputs. I think the time-stretching 
plugin is a very legitimate example, and I certainly don't understand 
your rationale that a time-stretching plugin should output the same 
number of samples under the same frequency sample rate. You see, my dear 
friend, this wouldn't be time-stretching. Also, for the tone generator 
plugins (output port only), it is nice to let the plugin tell the host 
how much data it wants to generate. Again, if I were to make changes to 
ladspa, all changes can be worked around so it is binary backward 
compatible with precompiled ladspa plugins, but i won't go into much 
detail because of the aforementioned reason.

oh well, since linux is such an open platform, I might as well work out 
another set of plugin API called LADNSSPA - Linux Audio Developer's Not 
So Simple Plugin API.

liulk

Reply via email to