LV2
1.0.13
|
LV2 Plugin Worker Interface. More...
Data Fields | |
LV2_Worker_Status(* | work )(LV2_Handle instance, LV2_Worker_Respond_Function respond, LV2_Worker_Respond_Handle handle, uint32_t size, const void *data) |
The worker method. More... | |
LV2_Worker_Status(* | work_response )(LV2_Handle instance, uint32_t size, const void *body) |
Handle a response from the worker. More... | |
LV2_Worker_Status(* | end_run )(LV2_Handle instance) |
Called when all responses for this cycle have been delivered. More... | |
LV2 Plugin Worker Interface.
This is the interface provided by the plugin to implement a worker method. The plugin's extension_data() method should return an LV2_Worker_Interface when called with LV2_WORKER__interface as its argument.
LV2_Worker_Status(* LV2_Worker_Interface::work)(LV2_Handle instance, LV2_Worker_Respond_Function respond, LV2_Worker_Respond_Handle handle, uint32_t size, const void *data) |
The worker method.
This is called by the host in a non-realtime context as requested, possibly with an arbitrary message to handle.
A response can be sent to run() using respond
. The plugin MUST NOT make any assumptions about which thread calls this method, other than the fact that there are no real-time requirements.
instance | The LV2 instance this is a method on. |
respond | A function for sending a response to run(). |
handle | Must be passed to respond if it is called. |
size | The size of data . |
data | Data from run(), or NULL. |
LV2_Worker_Status(* LV2_Worker_Interface::work_response)(LV2_Handle instance, uint32_t size, const void *body) |
Handle a response from the worker.
This is called by the host in the run() context when a response from the worker is ready.
instance | The LV2 instance this is a method on. |
size | The size of body . |
body | Message body, or NULL. |
LV2_Worker_Status(* LV2_Worker_Interface::end_run)(LV2_Handle instance) |
Called when all responses for this cycle have been delivered.
Since work_response() may be called after run() finished, this provides a hook for code that must run after the cycle is completed.
This field may be NULL if the plugin has no use for it. Otherwise, the host MUST call it after every run(), regardless of whether or not any responses were sent that cycle.