[linux-audio-dev] LV2 library API

tom christie christie.tom at gmail.com
Tue May 30 16:53:45 UTC 2006


Sounds reasonable to me.

Just to clarify, does that mean LV2_DATATYPE_FLOAT
would be #define'd as: "http://lv2plug.in/ontology#float"
or something else?...

I guess consistency would suggest using the same approach for both
slv2_port_get_class() and slv2_port_get_data_type().


> The problem with returning strings is namespace prefixes.  It's all fine
> if the type is in the lv2: namespace so it can return something nice
> like lv2:float, but if it's something else it will have to return the
> fully qualified URI.  For consistency's sake I'll have to return the
> full URI for everything.
>
> I think what I'll do is have the type function return a full URI, but
> #define symbols for the builtin port types (which is easily extensible
> without breaking anything).
>
> Something like:
>
> char* type = lv2_port_get_type(someplug, 0);
> if (!strcmp(type, LV2_DATATYPE_FLOAT))
>     /* ... */
> free(type);
>
> Better?
>
> -DR-
>
>



More information about the Linux-audio-dev mailing list