aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/eg05-scope.lv2/examploscope_ui.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-01-24 20:31:27 +0000
committerDavid Robillard <d@drobilla.net>2014-01-24 20:31:27 +0000
commitf19b7a8211590e73bc4ef739342e5c1a0755bc0d (patch)
tree1a4e377320e58dbd5082592f7cfe9459ffc42755 /plugins/eg05-scope.lv2/examploscope_ui.c
parent0824237942af542431a8348c55c367242d1bf49a (diff)
downloadlv2-f19b7a8211590e73bc4ef739342e5c1a0755bc0d.tar.xz
Replace use of lv2_atom_forge_property_head with lv2_atom_forge_key.
Diffstat (limited to 'plugins/eg05-scope.lv2/examploscope_ui.c')
-rw-r--r--plugins/eg05-scope.lv2/examploscope_ui.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/eg05-scope.lv2/examploscope_ui.c b/plugins/eg05-scope.lv2/examploscope_ui.c
index edb64f9..a8c1e2c 100644
--- a/plugins/eg05-scope.lv2/examploscope_ui.c
+++ b/plugins/eg05-scope.lv2/examploscope_ui.c
@@ -85,18 +85,20 @@ send_ui_state(LV2UI_Handle handle)
uint8_t obj_buf[1024];
lv2_atom_forge_set_buffer(&ui->forge, obj_buf, sizeof(obj_buf));
- // Event body is a ui_state object
+ // Start a ui:State object
LV2_Atom_Forge_Frame frame;
LV2_Atom* msg = (LV2_Atom*)lv2_atom_forge_object(
&ui->forge, &frame, 0, ui->uris.ui_State);
// msg[samples-per-pixel] = integer
- lv2_atom_forge_property_head(&ui->forge, ui->uris.ui_spp, 0);
+ lv2_atom_forge_key(&ui->forge, ui->uris.ui_spp);
lv2_atom_forge_int(&ui->forge, ui->stride);
+
// msg[amplitude] = float
- lv2_atom_forge_property_head(&ui->forge, ui->uris.ui_amp, 0);
+ lv2_atom_forge_key(&ui->forge, ui->uris.ui_amp);
lv2_atom_forge_float(&ui->forge, gain);
- // Close off forged data
+
+ // Finish ui:State object
lv2_atom_forge_pop(&ui->forge, &frame);
// Send message to plugin port '0'