From d8966c1a7ae598cdc6045d7bb1b2141357ec04f8 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Wed, 30 Oct 2024 18:30:04 -0400 Subject: [PATCH] respond to review --- include/clap/events.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/clap/events.h b/include/clap/events.h index 6f4204cc..198c7222 100644 --- a/include/clap/events.h +++ b/include/clap/events.h @@ -302,14 +302,16 @@ typedef struct clap_event_midi { // call in which the event is delivered or (from plugin->host) only the // duration of a try_push call. // -// Since `clap_output_events.try_push` requires you to make a copy of -// an event, host implementers receiving sysex messages from plugin need +// Since `clap_output_events.try_push` requires hosts to make a copy of +// an event, host implementers receiving sysex messages from plugins need // to take care to both copy the event (so header, size, etc...) but -// also allocate and memcpy the sysex pointer. Similarly plugins retaining -// the sysex outside the lifetime of a single process call must copy the -// sysex buffer to memory owned by the plugin. +// also memcpy the contents of the sysex pointer to host-owned memory, and +// not just copy the data pointer. // -// As a result, the data structure pointed to by the sysex buffer +// Similarly plugins retaining the sysex outside the lifetime of a single +// process call must copy the sysex buffer to plugin-owned memory. +// +// As a consequence, the data structure pointed to by the sysex buffer // must be contiguous and copyable with `memcpy` of `size` bytes. typedef struct clap_event_midi_sysex { clap_event_header_t header;