aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-01 06:35:58 +0000
committerDavid Robillard <d@drobilla.net>2012-03-01 06:35:58 +0000
commit88135c7bb27557e214928918ca46ecb86c790a0b (patch)
tree2659fdeff2e8a41100ff940f185147c58f633ce2 /plugins
parent68a5c369d8844da98ac735f5158c2c66cd7f39ed (diff)
downloadlv2-88135c7bb27557e214928918ca46ecb86c790a0b.tar.xz
Rework forge sink interface to support buffer resizing (e.g. realloc).
Diffstat (limited to 'plugins')
-rw-r--r--plugins/eg-sampler.lv2/sampler.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/eg-sampler.lv2/sampler.c b/plugins/eg-sampler.lv2/sampler.c
index e141aeb..2e3715c 100644
--- a/plugins/eg-sampler.lv2/sampler.c
+++ b/plugins/eg-sampler.lv2/sampler.c
@@ -384,16 +384,12 @@ run(LV2_Handle instance,
/* Set up forge to write directly to notify output port buffer */
const uint32_t notify_capacity = plugin->notify_port->atom.size;
- LV2_Atom_Sequence* seq = (LV2_Atom_Sequence*)plugin->notify_port;
- seq->atom.type = uris->atom_Sequence;
- seq->atom.size = seq->body.unit = seq->body.pad = 0;
-
lv2_atom_forge_set_buffer(&plugin->forge,
- LV2_ATOM_CONTENTS(LV2_Atom_Sequence, seq),
+ (uint8_t*)plugin->notify_port,
notify_capacity);
LV2_Atom_Forge_Frame seq_frame;
- lv2_atom_forge_push(&plugin->forge, &seq_frame, &seq->atom);
+ lv2_atom_forge_sequence_head(&plugin->forge, &seq_frame, 0);
/* Read messages from worker thread */
SampleMessage m;