diff options
author | David Robillard <d@drobilla.net> | 2012-02-16 23:05:48 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-02-16 23:05:48 +0000 |
commit | 75d524c764a6f91aa9662040a2c218e8d2802438 (patch) | |
tree | 3f42dfa23e1c9c24de8233f40e551f89803241e4 /lv2/lv2plug.in/ns/ext/atom/atom-helpers.h | |
parent | d3ca298da58bce97f95c7beaaea101fb7cf64c4c (diff) | |
download | lv2-75d524c764a6f91aa9662040a2c218e8d2802438.tar.xz |
Add atom:eventTransfer (for UIs that talk to atom event ports).
Add lv2_atom_total_size() helper.
Make LV2_Atom_Literal definiton consistent with others.
Rework forge API to support writing to an arbitrary sink function (e.g. ringbuffer).
Diffstat (limited to 'lv2/lv2plug.in/ns/ext/atom/atom-helpers.h')
-rw-r--r-- | lv2/lv2plug.in/ns/ext/atom/atom-helpers.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lv2/lv2plug.in/ns/ext/atom/atom-helpers.h b/lv2/lv2plug.in/ns/ext/atom/atom-helpers.h index ae2eb43..3bfad57 100644 --- a/lv2/lv2plug.in/ns/ext/atom/atom-helpers.h +++ b/lv2/lv2plug.in/ns/ext/atom/atom-helpers.h @@ -45,6 +45,13 @@ lv2_atom_pad_size(uint32_t size) return (size + 7) & (~7); } +/** Return the total size of @p atom, including the header. */ +static inline uint32_t +lv2_atom_total_size(const LV2_Atom* atom) +{ + return sizeof(LV2_Atom) + atom->size; +} + /** Return true iff @p atom is null. */ static inline bool lv2_atom_is_null(const LV2_Atom* atom) |