aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/eg-sampler.lv2/sampler.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/eg-sampler.lv2/sampler.c')
-rw-r--r--plugins/eg-sampler.lv2/sampler.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/eg-sampler.lv2/sampler.c b/plugins/eg-sampler.lv2/sampler.c
index bf288d7..8ef7bf9 100644
--- a/plugins/eg-sampler.lv2/sampler.c
+++ b/plugins/eg-sampler.lv2/sampler.c
@@ -442,17 +442,18 @@ run(LV2_Handle instance,
lv2_atom_forge_audio_time(&plugin->forge, seq, 0, 0);
LV2_Atom* set = (LV2_Atom*)lv2_atom_forge_blank(
- &plugin->forge, NULL, 0, plugin->uris.msg_Set);
+ &plugin->forge, NULL, 1, plugin->uris.msg_Set);
lv2_atom_forge_property_head(&plugin->forge, set, plugin->uris.msg_body, 0);
- LV2_Atom* body = (LV2_Atom*)lv2_atom_forge_blank(&plugin->forge, set, 0, 0);
+ LV2_Atom* body = (LV2_Atom*)lv2_atom_forge_blank(&plugin->forge, NULL, 2, 0);
lv2_atom_forge_property_head(&plugin->forge, body, plugin->uris.eg_file, 0);
- lv2_atom_forge_uri(&plugin->forge, set,
+ lv2_atom_forge_uri(&plugin->forge, body,
(const uint8_t*)plugin->sample->uri,
plugin->sample->uri_len);
- set->size += body->size;
+
+ set->size += lv2_atom_total_size(body);
seq->size += lv2_atom_total_size(set);
} else {
fprintf(stderr, "Unknown message from worker\n");