|
static LV2_Worker_Status | _work (LV2_Handle instance, LV2_Worker_Respond_Function respond, LV2_Worker_Respond_Handle handle, uint32_t size, const void *data) |
|
static LV2_Worker_Status | _work_response (LV2_Handle instance, uint32_t size, const void *body) |
|
static LV2_Worker_Status | _end_run (LV2_Handle instance) |
|
|
LV2_Worker_Schedule_Handle | m_work_schedule_handle |
|
LV2_Worker_Status(* | m_schedule_work_func )(LV2_Worker_Schedule_Handle handle, uint32_t size, const void *data) |
|
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.
static const void* extension_data |
( |
const char * |
uri | ) |
|
|
inlinestatic |
static void handle_feature |
( |
void * |
instance, |
|
|
FeatureData |
data |
|
) |
| |
|
inlinestatic |
WorkerStatus schedule_work |
( |
uint32_t |
size, |
|
|
const void * |
data |
|
) |
| |
|
inline |
Request from run() that the host call the worker.
This function is in the audio threading class. It should be called from run() to request that the host call the work() method in a non-realtime context with the given arguments.
This function is always safe to call from run(), but it is not guaranteed that the worker is actually called from a different thread. In particular, when free-wheeling (e.g. for offline rendering), the worker may be executed immediately. This allows single-threaded processing with sample accuracy and avoids timing problems when run() is executing much faster or slower than real-time.
Plugins SHOULD be written in such a way that if the worker runs immediately, and responses from the worker are delivered immediately, the effect of the work takes place immediately with sample accuracy.
The data
MUST be safe for the host to copy and later pass to work(), and the host MUST guarantee that it will be eventually passed to work() if this function returns WORKER_SUCCESS.
- Parameters
-
size | The size of data . |
data | Message to pass to work(), or NULL. |
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.
- Parameters
-
respond | A functor for sending a response to run(). |
size | The size of data . |
data | Data from run(), or NULL. |
WorkerStatus work_response |
( |
uint32_t |
size, |
|
|
const void * |
body |
|
) |
| |
|
inline |
Handle a response from the worker. This is called by the host in the run() context when a response from the worker is ready.
- Parameters
-
size | The size of body . |
body | Message body, or NULL. |
The documentation for this struct was generated from the following file: