diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/resize-port.lv2/resize-port.h | 10 | ||||
-rw-r--r-- | ext/resize-port.lv2/resize-port.ttl | 18 |
2 files changed, 16 insertions, 12 deletions
diff --git a/ext/resize-port.lv2/resize-port.h b/ext/resize-port.lv2/resize-port.h index 4ba533b..ad6a5dc 100644 --- a/ext/resize-port.lv2/resize-port.h +++ b/ext/resize-port.lv2/resize-port.h @@ -35,6 +35,16 @@ typedef struct { * This function MAY return false, in which case the port buffer was * not resized and the port is still connected to the same location. * Plugins MUST gracefully handle this situation. + * + * This function MUST NOT be called from any context other than + * the context associated with the port of the given index. + * + * The host MUST preserve the contents of the port buffer when + * resizing. + * + * Plugins MAY resize a port many times in a single run callback. + * Hosts SHOULD make this an inexpensive as possible (i.e. plugins + * can liberally use this function in a similar way to realloc). */ bool (*resize_port)(LV2_Resize_Port_Feature_Data data, uint32_t index, diff --git a/ext/resize-port.lv2/resize-port.ttl b/ext/resize-port.lv2/resize-port.ttl index d6bbb35..7709c0a 100644 --- a/ext/resize-port.lv2/resize-port.ttl +++ b/ext/resize-port.lv2/resize-port.ttl @@ -40,19 +40,13 @@ An extension that allows LV2 plugins to request a resize of an output port. Any host which supports this extension must pass an LV2_Feature to the plugin's instantiate method with URI http://lv2plug.in/ns/ext/resize-port -and a pointer to a -<pre> -struct { - void* host_handle; - void (*resize_port)(void* host_handle, uint32_t index); -} -</pre> -where the plugin may call resize_port with the given host_handle from any -context to demand the resize of an output port buffer. The plugin MUST call -this function from the context of the given port. +and a pointer to a LV2_Resize_Port_Feature structure (see +<a href="resize-port.h">resize-port.h</a> for details). This structure +provides a resize_port function which plugins may use to resize output +port buffers as necessary. -This function MAY return NULL at any time, plugins MUST gracefully handle -this situation. +This extension also defines several predicates useful for describing the +amount of space required for a particular port buffer. """ . rsz:asLargeAs a rdf:Property ; |