aboutsummaryrefslogtreecommitdiffstats
path: root/ext/atom.lv2/atom-helpers.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-10-19 02:52:21 +0000
committerDavid Robillard <d@drobilla.net>2010-10-19 02:52:21 +0000
commit7a613aa2758ee6b17f51e3bd285ee16b4eaa1e1a (patch)
tree387ebbe2e9cb0283da3ae0e747671bf3aee0e134 /ext/atom.lv2/atom-helpers.h
parent5d5929d732062591213f156433d0bfbff4080a9c (diff)
downloadlv2-7a613aa2758ee6b17f51e3bd285ee16b4eaa1e1a.tar.xz
Fix alignment restrictions.
Align Atoms to 32-bits, since the LV2_Atom header is only 32-bit aligned so the payload would not be 64-bit aligned even if the LV2_Atom header is (note the same problem applies to events, oops).
Diffstat (limited to 'ext/atom.lv2/atom-helpers.h')
-rw-r--r--ext/atom.lv2/atom-helpers.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/atom.lv2/atom-helpers.h b/ext/atom.lv2/atom-helpers.h
index f4908e3..e14a1e9 100644
--- a/ext/atom.lv2/atom-helpers.h
+++ b/ext/atom.lv2/atom-helpers.h
@@ -37,11 +37,11 @@
*/
-/** Pad a size to 64 bits (for atom sizes) */
+/** Pad a size to 4 bytes (32 bits) */
static inline uint16_t
lv2_atom_pad_size(uint16_t size)
{
- return (size + 7) & (~7);
+ return (size + 3) & (~3);
}
typedef LV2_Atom_Property* LV2_Atom_Dict_Iter;