Re: [LAD] "enhanced event port" LV2 extension proposal

From: Dave Robillard <drobilla@email-addr-hidden>
Date: Sat Dec 01 2007 - 21:09:49 EET

On Fri, 2007-11-30 at 16:21 +0200, Nedko Arnaudov wrote:
> Krzysztof Foltman <wdev@email-addr-hidden> writes:
>
> > Lars Luthman wrote:
> >
> >> non-standard hacks in a specification. But with the current event header
> >> proposal we don't have a pointer _or_ a flexible array member in it, so
> >> this discussion is sort of pointless.
> >
> > So, basically, we have a choice between:
> >
> > struct LV2_EVENT_HEADER_LLKF
> > {
> > uint32_t timestamp; // 16:16
> > uint16_t payload_size;
> > uint16_t event_type;
> > };

Might as well break the time stamp into two separate uint16_t's and make
life easy.

> > struct LV2_EVENT_TYPE_X
> > {
> > LV2_EVENT_HEADER_LLKF hdr;
> > // type X-specific data here (be it a pointer, or in-place data, or
> > whatever)
> > // size must be an integer multiple of 8 bytes
> > };
> >
> > and different variants of:
> >
> > struct LV2_EVENT_HEADER_DR
> > {
> > float_or_double timestamp;
> > some_int_type2 payload_size;
> > some_int_type event_type;
> > // pointer to data or inline data array here
> > };
> >
> > which - I believe - Dave seems to favour.
>
> I like header variant (no payload specified directly) with (8 byte)
> alignment. It is better than specifying N byte payload as array. Also it
> is both C and C++ friendly.

Please, please let this silly 'type of the data member' angle of
conversation die... :)

Hereby humbly requesting that:

// data follows here

be the last thing in the event struct for the purposes of this
conversation, since it's irrelevant and not a point of debate

-DR-

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Sun Dec 2 00:15:03 2007

This archive was generated by hypermail 2.1.8 : Sun Dec 02 2007 - 00:15:04 EET