aboutsummaryrefslogtreecommitdiff
path: root/atom_inspector.c
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2016-03-02 20:59:28 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2016-03-02 20:59:28 +0100
commit5ee440092342550add72a62f01d8f5e9e8bd9633 (patch)
treeb5ec0fa7de0c102c56b63204625f1c33fcdb4b3b /atom_inspector.c
parent411c057acf543f713a865e8733fed95c88425b4e (diff)
downloadsherlock.lv2-5ee440092342550add72a62f01d8f5e9e8bd9633.tar.xz
overhaul atom inspector plugin/ui.
* use split screen for event sequence and details. * show frame offset and period size.
Diffstat (limited to 'atom_inspector.c')
-rw-r--r--atom_inspector.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/atom_inspector.c b/atom_inspector.c
index c8cb63e..0bfedba 100644
--- a/atom_inspector.c
+++ b/atom_inspector.c
@@ -28,6 +28,8 @@ struct _handle_t {
LV2_Atom_Sequence *control_out;
LV2_Atom_Sequence *notify;
LV2_Atom_Forge forge;
+
+ uint64_t offset;
};
static LV2_Handle
@@ -105,12 +107,22 @@ run(LV2_Handle instance, uint32_t nsamples)
// only serialize sequence to UI if there were actually any events
if(handle->control_in->atom.size > sizeof(LV2_Atom_Sequence_Body))
{
+ LV2_Atom_Forge_Frame tup_frame;
+
if(ref)
ref = lv2_atom_forge_frame_time(forge, 0);
if(ref)
+ ref = lv2_atom_forge_tuple(forge, &tup_frame);
+ if(ref)
+ ref = lv2_atom_forge_long(forge, handle->offset);
+ if(ref)
+ ref = lv2_atom_forge_int(forge, nsamples);
+ if(ref)
ref = lv2_atom_forge_raw(forge, handle->control_in, size);
if(ref)
lv2_atom_forge_pad(forge, size);
+ if(ref)
+ lv2_atom_forge_pop(forge, &tup_frame);
}
@@ -118,6 +130,8 @@ run(LV2_Handle instance, uint32_t nsamples)
lv2_atom_forge_pop(forge, &frame);
else
lv2_atom_sequence_clear(handle->notify);
+
+ handle->offset += nsamples;
}
static void