Description

This extension allows plugins to have a non-realtime worker method, with thread sychronisation and communication issues handled by the host. This allows plugins to perform non-realtime actions (such as loading files) using a simple and portable API without having to worry about the complexities of multi-threading.

Because the worker thread is implemented by the host, many plugins can share the same thread and communication buffers, which reduces bloat and fixed per-plugin buffer size limitations. The host has the power to implement threads in a suitable way, while plugins are simpler and thus less error-prone.

This interface is designed to gracefully handle single-threaded synchronous execution, in which case the host may simply run all work immediately. This makes it possible for the same plugin code to work with sample accuracy for offline rendering, or in real-time with non-real-time work taking place in a separate thread.

Index

Instances
interface, schedule

Reference

Instance work:interface

The interface provided by the plugin to implement a worker. To implement this extension, the plugin must return a valid LV2_Worker_Interface from LV2_Descriptor::extension_data() when it is called with URI LV2_WORKER__interface.

The plugin data file should describe this like so:

@prefix work: <http://lv2plug.in/ns/ext/worker#> .

<plugin>
    a lv2:Plugin ;
    lv2:extensionData work:interface .
Typelv2:ExtensionData

Instance work:schedule

A feature which provides functions for use by the plugin to implement a worker method. To support this feature, the host must pass an LV2_Feature to LV2_Descriptor::instantiate() with URI LV2_WORKER__schedule and data pointed to an instance of LV2_Worker_Schedule.

Typelv2:Feature

History

Version 2.2 (2014-08-08)
  • Add patch:sequenceNumber for associating replies with requests.
Version 2.2 (2014-01-04)
  • Add missing include string.h to logger.h for memset.
Version 1.6 (2013-05-26)
  • Fix crash in forge.h when pushing atoms to a full buffer.
Version 1.4 (2013-01-27)
  • Remove atom:stringType in favour of owl:onDatatype so generic tools can understand and validate atom literals.
  • Improve atom documentation.
  • Fix lv2_atom_sequence_end().
Version 2.0 (2013-01-16)
  • Add state:loadDefaultState feature so plugins can have their default state loaded without hard-coding default state as a special case.
Version 1.10 (2013-01-13)
  • Fix incorrect return type in lv2_event_get().
Version 2.0 (2013-01-10)
  • Make patch:Set a compact message for setting one property.
  • Add patch:readable and patch:writable for describing available properties.
Version 2.0 (2013-01-08)
  • Add logger convenience API.
Version 1.2 (2012-12-21)
  • Fix typo in bufsz:sequenceSize label.
Version 1.4 (2012-10-14)
  • Fix typo in urid:unmap documentation.
Version 1.0 (2012-04-17)
  • Initial release.
Version 1.0 (2011-11-21)
  • Initial release.
Version 1.4 (2011-11-21)
  • Deprecate uri-map in favour of urid.
  • Update packaging.
Version 2.2 (2011-11-21)
  • Improve documentation.
  • Update packaging.
Version 1.4 (2011-11-21)
  • Improve documentation.
  • Update packaging.
Version 1.4 (2011-11-21)
  • Improve documentation.
  • Update packaging.
Version 1.4 (2011-11-21)
  • Update packaging.
Version 1.4 (2011-11-21)
  • Update packaging.
  • Improve documentation.
Version 1.2 (2011-05-26)
  • Mark up documentation in HTML using lv2:documentation.
  • Add build system (for installation).
Version 1.2 (2011-05-26)
  • Add build system for installation.
  • Switch to ISC license.
Version 1.2 (2011-05-26)
  • Switch to ISC license.
  • Add build system for installation.
Version 1.2 (2011-05-26)
  • Convert documentation to HTML and use lv2:documentation.
  • Add build system (for installation).
  • Use lv2:Specification to be discovered as an extension.
Version 1.2 (2011-05-26)
  • Add build system for installation.
  • Switch to ISC license.
Version 1.0 (2010-11-24)
  • Initial release.
Version 1.0 (2010-10-18)
  • Initial release.
Version 2.0 (2010-10-04)
  • Initial release.
Version 1.0 (2010-10-04)
  • Initial release.
Version 1.0 (2010-10-04)
  • Initial release.
Version 1.0 (2010-10-04)
  • Initial release.