Re: [linux-audio-dev] LV2 library API

From: Steve Harris <S.W.Harris@email-addr-hidden>
Date: Thu Jun 01 2006 - 11:42:29 EEST

On Tue, May 30, 2006 at 03:09:33 -0400, Dave Robillard wrote:
> I'm a bit unhappy that it makes code longer and more messy though. The
> primary design goal here is to make host code as terse and simple as
> possible. strcmp'ing a string and then freeing it is quite a bit uglier
> than just testing an enum val :/

This is maybe a PITA, but what about a runtime provided enum list, like:

foo_enum = { { FOO_FLOAT, LV2_FLOAT_URI },
             { FOO_MIDI, "http://example.org/datatypes/midi" },
             { 0, NULL } };
lv2_set_urilist(foo_enum);

the library can contain an builtin enum list that is set implictly, ie. it
does lv2_set_urilist(lv2_internal_enum); when it starts.

that way simple hosts can just use it as is, and more complex ones can
specify the types they support, and everyone gets to use ints.

- Steve
Received on Thu Jun 1 12:15:02 2006

This archive was generated by hypermail 2.1.8 : Thu Jun 01 2006 - 12:15:02 EEST