From 0bfaa3cfd32f06f1f14688ba5f4d4f15dc2e9633 Mon Sep 17 00:00:00 2001
From: David Robillard 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. This extension allows plugins to schedule work that must be performed in
+another thread. Plugins can use this interface to safely perform work that is
+not real-time safe, and receive the result in the run context. The details of
+threading are managed by the host, allowing plugins to be simple and portable
+while using resources more efficiently. This interface is designed to gracefully support single-threaded synchronous
+execution, which allows the same code to work with sample accuracy for offline
+rendering. For example, a sampler plugin may schedule a sample to be loaded
+from disk in another thread. During live execution, the host will call the
+plugin's work method from another thread, and deliver the result to the audio
+thread when it is finished. However, during offline export, the
+ 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: The work interface provided by a plugin, LV2_Worker_Interface.scheduled
load would be executed immediately in the same thread. This
+enables reproducible offline rendering, where any changes affect the output
+immediately regardless of how long the work takes to execute.
@prefix work: <http://lv2plug.in/ns/ext/worker#> .
@@ -50,20 +43,11 @@ LV2_WORKER__interface.
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.
- -The plugin data file should describe this like so:
--@prefix work: <http://lv2plug.in/ns/ext/worker#> . - -<plugin> - a lv2:Plugin ; - lv2:requiredFeature work:schedule . -- -
As usual, lv2:optionalFeature may be used instead, if the plugin is capable -of running in a host that does not provide this feature.
-""" . +The work scheduling feature provided by a host, LV2_Worker_Schedule.
+ +If the host passes this feature to LV2_Descriptor::instantiate, the plugin +MAY use it to schedule work in the audio thread, and MUST NOT call it in any +other context. Hosts MAY pass this feature to other functions as well, in +which case the plugin MAY use it to schedule work in the calling context. The +plugin MUST NOT assume any relationship between different schedule +features.
""" . -- cgit v1.2.1