Subject: Re: [linux-audio-dev] stereo / multichannel plugins in LADSPA ?
From: Paul Barton-Davis (pbd_AT_Op.Net)
Date: Thu Mar 23 2000 - 21:20:42 EET
>> Let's assume we want to stream 24 channels into a single plugin which does
>> something and then outputs back 24 channels.
>>
>> That would require 24in and 24out ports with lots of overhead, especially in
>> terms of number of used valiables , sample pointers etc, and access patters
>> which could hurt the cache quite a bit.
OK, so far so good.
>> Therefore I am thinking about supporting interleaved data streams in LADSPA.
>>
>> ie: a 4 channel stream looks as follows:
>> S1CH1 S1CH2 S1CH3 S1CH4 S2CH1 S2CH2 S2CH3 S2CH4 S3CH1 ....
>> (sample1 channel 1 , sample1 channel2 etc .... )
uh-oh ...
>> Again the complexity added to the API is not big:
>>
>> The host checks if the plugin supports stereo/multichannel operation,
>> and during initialization it tells the plugin how many channels it wants to
>use.
how can the host possibly know this ? what if the plugin is a 24
channel mixer, with 24 independent connections ? what if the host is
multiplexing some set of plugin outputs into our multichannel plugin
according to the user drawing patch cords on the host's GUI ? how can
it know at initialization time how many channels ?
i can't think of any devices that accept 24 channels of data, process
them all in the same way, and spit out 24 channels. so first of all,
this isn't a very likely model. but even if it was - OK, just use 24
ports, and let them all be connected independently. yes, its a
performance hit, but thats OK, its a rather strange thing to be
doing.
the performance hit from cache effects and/or loop iterations *HAS* to
happen either in the host (see my next paragraph) or in the plugin, so
its a wash eiher way.
>> again, we need you thoughts about this !
your scheme makes it hard/impossible to create a multichannel plugin that
accepts data from different plugins. why ? because the data would have
to interleaved, and that would mean that the host would have to do
this. we want LADSPA hosts to, in the words of a good saying about
OS's: provide mechanism, not policy. having the host interleave data
from multiple plugins is a big step in the direction of policy, and
should be left alone.
>> With my proposed enhancements, LADSPA could easily become
>> _THE_ plugin API (at least for audio streaming) for Linux.
since there is no *other* plugin API, right now it appears to be _THE_
plugin api by default :)
--p
This archive was generated by hypermail 2b28 : Thu Mar 23 2000 - 22:18:08 EET