aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2016-05-24 18:16:28 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2016-05-24 18:16:28 +0200
commit86384de49d0b4ed42783371dd69a22eccf103396 (patch)
treee84853df9dec086edbf71bffda83661c5ed34dce
parent3dd057e8544212cb08368c4ee5428c0d50982bf8 (diff)
downloadsherlock.lv2-86384de49d0b4ed42783371dd69a22eccf103396.tar.xz
fixes for updated osc.lv2.
-rw-r--r--osc_inspector_eo.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/osc_inspector_eo.c b/osc_inspector_eo.c
index 4c7fc64..3738d3a 100644
--- a/osc_inspector_eo.c
+++ b/osc_inspector_eo.c
@@ -252,27 +252,15 @@ _atom_stringify(UI *ui, char *ptr, char *end, const LV2_Atom *atom)
}
case LV2_OSC_CHAR:
{
- sprintf(ptr, TYPE(" c:", "%c"), ((const LV2_Atom_Int *)itm)->body);
+ const char *str = LV2_ATOM_CONTENTS_CONST(LV2_Atom_Literal, itm);
+ sprintf(ptr, TYPE(" c:", "%c"), str[0]);
ptr += strlen(ptr);
break;
}
case LV2_OSC_RGBA:
{
- const uint8_t *chunk = LV2_ATOM_BODY_CONST(itm);
- sprintf(ptr, TYPE_PRE(" r:", PUNKT("[")));
- ptr += strlen(ptr);
- if(itm->size)
- {
- sprintf(ptr, "%02"PRIX8, chunk[0]);
- ptr += strlen(ptr);
-
- for(unsigned i=1; i<itm->size; i++)
- {
- sprintf(ptr, " %02"PRIX8, chunk[i]);
- ptr += strlen(ptr);
- }
- }
- sprintf(ptr, TYPE_POST(PUNKT("]")));
+ const char *str = LV2_ATOM_CONTENTS_CONST(LV2_Atom_Literal, itm);
+ sprintf(ptr, TYPE(" r:", "%s"), str);
ptr += strlen(ptr);
break;
}