#[repr(C)]pub struct LV2_Worker_Schedule {
pub handle: LV2_Worker_Schedule_Handle,
pub schedule_work: Option<unsafe extern "C" fn(handle: LV2_Worker_Schedule_Handle, size: u32, data: *const c_void) -> LV2_Worker_Status>,
}Expand 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().
Fields§
§handle: LV2_Worker_Schedule_HandleOpaque host data.
schedule_work: Option<unsafe extern "C" fn(handle: LV2_Worker_Schedule_Handle, size: u32, data: *const c_void) -> LV2_Worker_Status>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.
@param handle The handle field of this struct.
@param size The size of data.
@param data Message to pass to work(), or NULL.
Trait Implementations§
Source§impl Clone for LV2_Worker_Schedule
impl Clone for LV2_Worker_Schedule
Source§fn clone(&self) -> LV2_Worker_Schedule
fn clone(&self) -> LV2_Worker_Schedule
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more