diff options
author | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2016-11-08 22:41:25 +0100 |
---|---|---|
committer | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2016-11-08 22:41:25 +0100 |
commit | c6f8fb69c755e4732c879b82d77bdd343754d069 (patch) | |
tree | 9ec1b716e36567396d1523fe7704f52a2ab31c5d /osc.lv2 | |
parent | 0f69bfebd8edf63fe43a6bbc0d9ddea3b62633fe (diff) | |
download | sherlock.lv2-c6f8fb69c755e4732c879b82d77bdd343754d069.tar.xz |
fix LV2_ATOM_TUPLE_FOREACH.
for LV2 < 1.12, that is
Diffstat (limited to 'osc.lv2')
-rw-r--r-- | osc.lv2/util.h | 6 | ||||
-rw-r--r-- | osc.lv2/writer.h | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/osc.lv2/util.h b/osc.lv2/util.h index c7c5d66..b9d3746 100644 --- a/osc.lv2/util.h +++ b/osc.lv2/util.h @@ -31,6 +31,12 @@ extern "C" { #endif +#undef LV2_ATOM_TUPLE_FOREACH // there is a bug in LV2 1.10.0 +#define LV2_ATOM_TUPLE_FOREACH(tuple, iter) \ + for (LV2_Atom* (iter) = lv2_atom_tuple_begin(tuple); \ + !lv2_atom_tuple_is_end(LV2_ATOM_BODY(tuple), (tuple)->atom.size, (iter)); \ + (iter) = lv2_atom_tuple_next(iter)) + typedef void (*LV2_OSC_Method)(const char *path, const LV2_Atom_Tuple *arguments, void *data); diff --git a/osc.lv2/writer.h b/osc.lv2/writer.h index d11cfb6..c081cad 100644 --- a/osc.lv2/writer.h +++ b/osc.lv2/writer.h @@ -31,6 +31,12 @@ extern "C" { #endif +#undef LV2_ATOM_TUPLE_FOREACH // there is a bug in LV2 1.10.0 +#define LV2_ATOM_TUPLE_FOREACH(tuple, iter) \ + for (LV2_Atom* (iter) = lv2_atom_tuple_begin(tuple); \ + !lv2_atom_tuple_is_end(LV2_ATOM_BODY(tuple), (tuple)->atom.size, (iter)); \ + (iter) = lv2_atom_tuple_next(iter)) + typedef struct _LV2_OSC_Writer LV2_OSC_Writer; typedef struct _LV2_OSC_Writer_Frame LV2_OSC_Writer_Frame; |