Logo Search packages:      
Sourcecode: abgate version File versions  Download package

typedef void(* LV2UI_Write_Function)(LV2UI_Controller controller, uint32_t port_index, uint32_t buffer_size, uint32_t format, const void *buffer)

The type of the host-provided function that the UI can use to send data to a plugin's input ports. The buffer parameter must point to a block of data, buffer_size bytes large. The contents of this buffer and what the host should do with it depends on the value of the format parameter.

The format parameter should either be 0 or a numeric ID for a "Transfer mechanism". Transfer mechanisms are Features and may be defined in meta-extensions. They specify how to translate the data buffers passed to this function to input data for the plugin ports. If a UI wishes to write data to an input port, it must list a transfer mechanism Feature for that port's class as an optional or required feature (depending on whether the UI will work without being able to write to that port or not). The only exception is when the UI wants to write single float values to input ports of the class lv2:ControlPort, in which case buffer_size should always be 4, the buffer should always contain a single IEEE-754 float, and format should be 0.

The numeric IDs for the transfer mechanisms are provided by a URI-to-integer mapping function provided by the host, using the URI Map feature <http://lv2plug.in/ns/ext/uri-map> with the map URI "http://lv2plug.in/ns/extensions/ui". Thus a UI that requires transfer mechanism features also requires the URI Map feature, but this is implicit - the UI does not have to list the URI map feature as a required or optional feature in it's RDF data.

An UI MUST NOT pass a format parameter value (except 0) that has not been returned by the host-provided URI mapping function for a host-supported transfer mechanism feature URI.

The UI MUST NOT try to write to a port for which there is no specified transfer mechanism, or to an output port. The UI is responsible for allocating the buffer and deallocating it after the call.

Definition at line 101 of file ui.h.

Generated by  Doxygen 1.6.0   Back to index