From cb0fd14636a32785963474a8d9400ba9bd2ff1e2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 31 Jul 2016 15:15:40 -0400 Subject: Add state:threadSafeRestore feature --- lv2/lv2plug.in/ns/ext/state/lv2-state.doap.ttl | 4 +++- lv2/lv2plug.in/ns/ext/state/state.h | 13 +++++++------ lv2/lv2plug.in/ns/ext/state/state.ttl | 17 +++++++++++++++++ 3 files changed, 27 insertions(+), 7 deletions(-) (limited to 'lv2/lv2plug.in') diff --git a/lv2/lv2plug.in/ns/ext/state/lv2-state.doap.ttl b/lv2/lv2plug.in/ns/ext/state/lv2-state.doap.ttl index 6af90ea..feacdee 100644 --- a/lv2/lv2plug.in/ns/ext/state/lv2-state.doap.ttl +++ b/lv2/lv2plug.in/ns/ext/state/lv2-state.doap.ttl @@ -15,11 +15,13 @@ doap:maintainer ; doap:release [ doap:revision "2.1" ; - doap:created "2015-12-04" ; + doap:created "2016-07-31" ; dcs:blame ; dcs:changeset [ dcs:item [ rdfs:label "Add LV2_STATE_ERR_NO_SPACE status flag." + ] , [ + rdfs:label "Add state:threadSafeRestore feature for dropout-free state restoration." ] ] ] , [ diff --git a/lv2/lv2plug.in/ns/ext/state/state.h b/lv2/lv2plug.in/ns/ext/state/state.h index d446b30..0567e1b 100644 --- a/lv2/lv2plug.in/ns/ext/state/state.h +++ b/lv2/lv2plug.in/ns/ext/state/state.h @@ -35,12 +35,13 @@ #define LV2_STATE_URI "http://lv2plug.in/ns/ext/state" #define LV2_STATE_PREFIX LV2_STATE_URI "#" -#define LV2_STATE__State LV2_STATE_PREFIX "State" -#define LV2_STATE__interface LV2_STATE_PREFIX "interface" -#define LV2_STATE__loadDefaultState LV2_STATE_PREFIX "loadDefaultState" -#define LV2_STATE__makePath LV2_STATE_PREFIX "makePath" -#define LV2_STATE__mapPath LV2_STATE_PREFIX "mapPath" -#define LV2_STATE__state LV2_STATE_PREFIX "state" +#define LV2_STATE__State LV2_STATE_PREFIX "State" +#define LV2_STATE__interface LV2_STATE_PREFIX "interface" +#define LV2_STATE__loadDefaultState LV2_STATE_PREFIX "loadDefaultState" +#define LV2_STATE__makePath LV2_STATE_PREFIX "makePath" +#define LV2_STATE__mapPath LV2_STATE_PREFIX "mapPath" +#define LV2_STATE__state LV2_STATE_PREFIX "state" +#define LV2_STATE__threadSafeRestore LV2_STATE_PREFIX "threadSafeRestore" #ifdef __cplusplus extern "C" { diff --git a/lv2/lv2plug.in/ns/ext/state/state.ttl b/lv2/lv2plug.in/ns/ext/state/state.ttl index 699ef45..a5b205e 100644 --- a/lv2/lv2plug.in/ns/ext/state/state.ttl +++ b/lv2/lv2plug.in/ns/ext/state/state.ttl @@ -347,3 +347,20 @@ char* save_myfile(LV2_State_Make_Path* make_path) } """ . + +state:threadSafeRestore + a lv2:Feature ; + rdfs:label "thread-safe restore" ; + lv2:documentation """ +

If a plugin supports this feature, its LV2_State_Interface::restore method +is thread-safe and may be called concurrently with audio class functions.

+ +

To support this feature, the host MUST pass a work:schedule feature to the restore +method, which will be used to complete the state restoration. The usual +mechanics of the worker apply: the host will call the plugin's work method, +which emits a response which is later applied in the audio thread.

+ +

The host is not required to block run() while restore() and work() load the +state, so this feature allows state to be restored without dropouts.

+""" . -- cgit v1.2.1