Fons Adriaensen fons at kokkinizita.net
Thu Jun 18 21:29:21 UTC 2009

On Thu, Jun 18, 2009 at 10:50:45PM +0200, Stefano D'Angelo wrote:

> Now, suppose you wanted to add other kind of stuff in some future to
> ports: if they are strings, you could do this thing once again (maybe,
> maybe not), if they are not strings (e.g. units of measure as an
> enum), how to do that with this same approach? Add as strings and ask
> the host to perform the conversion? The more stuff in there, the more
> likely it will get difficult to use/understand.

I don't claim this is the universal solution to all
problems of this sort. It solves this one, that and
that's all.

We had the same discussion 5 years ago, it ended
in nothing happening at all, and nothing was added
to ALSA since. I don't think much more is to follow,
as we now have other standards such LRDF for Alsa
and LV2. Still, not being able to have labels for
enumerated params remains a gaping hole - it's the
missing thing if you want to make a simple GUI based
on the info provided by the plugin (and nothing else).
I would like to see it filled, even if that is the
last thing that gets added. I do really not think
many people will use it, but those that don't can
ignore it.

> Plus, you can't change the name of the parameter (PortNames) in the
> descriptor, without breaking API, which is weird.

You can. Fields are not referred to by name in compiled
code. Host and plugins can use different names, except
for symbols that are looked up by dlsym(). 
> He has to read this code, otherwise explaining it could create
> confusion, and not everybody wants to read someone else's code.

Not really. Labels follow the part names, in the same
array. In the order you'd expect. That's all you need
to know. The code I posted serves only to demonstrate
that you don't need a genius to handle this. You're
free to write it in any other way you like.

Plus, 'not everybody want to read someone else's code'
may be true, but still everybody, at least in my world,
is responsable for the consequences of his/her own
choices including that one. I have learned probably
99% of what I know about C/C++ programming by reading
other people's code, and I would not advise anyone to
not do that.
> >> you're becoming too Italian man (and here's an Italian
> >> writing this mail).
> >
> > :-) Is it as hot where you are ?
> I have a fan pushing air on my back all day :-P

I found it kind of funny the latest weeks to be surrounded
by 'locals' complaining about the temperature. They should
be used to it... :-) When I was in Senegal some years ago
*that* was hot. But the locals there found it quite normal
and used to make fun of those poor tourists...



Io lo dico sempre: l'Italia è troppo stretta e lunga.

More information about the Linux-audio-dev mailing list