Re: [linux-audio-dev] LADSPA with dynamic datatype and multichannelsupport released !!

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] LADSPA with dynamic datatype and multichannelsupport released !!
From: David Olofson (david_AT_gardena.net)
Date: Thu Mar 30 2000 - 09:14:55 EEST


On Mon, 27 Mar 2000, Erik Steffl wrote:
> Benno Senoner wrote:
> ...
> >> - plugins can support DIFFERENT datatypes for input and outputs.
> > The restriction is that you can have only one input datatype and one output
> > datype.
> > For example if you set input datatype = float and output datatype = double
> > the both input CONTROL ports and input AUDIO ports have to use the float
> > type, while output CONTROL ports and output AUDIO ports have to use double.
>
> this does not make sense at all. I mean, you either cros the street or
> don't cross the street but you don't stand in the middle... the datatype
> is a property of port, not property of plugin.
>
> > Allowing per-port datatype would make things much more complicated for host
> > and plugins, since our goal here is audio streaming not events.
>
> I think that having each port completely independent entity (too bad
> this is not C++) makes it easier, not harder. you know that you can do
> certain things with port... why should the plugin be important? I mean
> you should be able to the same things with port in plugin and in host
> (and in host you definitely don't want to restrict to one type of data
> for all ports). divide et impera (hope I've got spelling right).

Hmm... Good points here. After giving it some more thought, I think I
was right in the first place. Most hosts will probably do connections
at the port level, rather than handling all outputs as one bank and
thi inputs as another. That is, the type check has to be done once
per port anyway, so it doesn't make much difference if you have to
look it up in a table with one entry per channel or something else -
it might actually be simpler. (BTW, all other stuff is arranged as
arrays in the same fashion...)

> >> (Notice: mentally sick people could even combine the interleaved multichannel
> > mode with bit fields, for example streaming multiple interleaved single-bit
> > streams over arrays of bytes. David, u like this ? :-) )
>
> oh yeah, and by having 16 1-bit channels you can convinietly simulate
> 16-bit audio channel! :-)

Cool! :-D

> > In the case of a plugin supporting multiple datatypes ,
> > since the datatype is passed to the instantiate function, some of the
> > functionpointer assignments have to be moved from the descriptor()
> > function to the instantiate() function since these are datatype dependent.
> > eg. a plugin supporting float and double would have two run() functions
> > run32() and run64() the Descriptor->run pointer would be assigned based
> > on the datatype passed to the instantiate function.
> > It's really easy to add a new datatype to a plugin.
>
> ??? as I see it the datatype is a characteristic of a port. all data
> description/definition should be in port (obtainable using the port
> descriptor only). the plugin should be close to not caring about the
> data-types (other then it has to process the data:-)

Exactly the idea of my suggestion. A plugin is hardcoded for a
certain combination of data types on the ports, and it just tells the
host what it will expect and/or generate. Dynamic data types for one
port usually means a big array of run() function variants, or very
limited optimization possibilities.

//David

.- M u C o S --------------------------------. .- David Olofson ------.
| A Free/Open Multimedia | | Audio Hacker |
| Plugin and Integration Standard | | Linux Advocate |
`------------> http://www.linuxdj.com/mucos -' | Open Source Advocate |
.- A u d i a l i t y ------------------------. | Singer |
| Rock Solid Low Latency Signal Processing | | Songwriter |
`---> http://www.angelfire.com/or/audiality -' `-> david_AT_linuxdj.com -'


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Mar 30 2000 - 13:26:48 EEST