LMMS
Loading...
Searching...
No Matches
LV2_Worker_Schedule Struct Reference

#include <worker.h>

Public Attributes

LV2_Worker_Schedule_Handle handle
LV2_Worker_Status(* schedule_work )(LV2_Worker_Schedule_Handle handle, uint32_t size, const void *data)

Detailed Description

Schedule Worker Host Feature.

The host passes this feature to provide a schedule_work() function, which the plugin can use to schedule a worker call from run().

Member Data Documentation

◆ handle

◆ schedule_work

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 (for example, during 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 LV2_WORKER_SUCCESS.

Parameters
handleThe handle field of this struct.
sizeThe size of data.
dataMessage to pass to work(), or NULL.

The documentation for this struct was generated from the following file: