diff options
-rw-r--r-- | lv2/lv2plug.in/ns/ext/state/lv2-state.doap.ttl | 8 | ||||
-rw-r--r-- | lv2/lv2plug.in/ns/ext/state/manifest.ttl | 2 | ||||
-rw-r--r-- | lv2/lv2plug.in/ns/ext/state/state.ttl | 13 | ||||
-rw-r--r-- | plugins/eg-sampler.lv2/sampler.ttl | 6 |
4 files changed, 27 insertions, 2 deletions
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 c26cba1..48fb89f 100644 --- a/lv2/lv2plug.in/ns/ext/state/lv2-state.doap.ttl +++ b/lv2/lv2plug.in/ns/ext/state/lv2-state.doap.ttl @@ -14,6 +14,14 @@ <http://drobilla.net/drobilla#me> ; doap:maintainer <http://drobilla.net/drobilla#me> ; doap:release [ + doap:revision "1.3" ; + doap:created "2013-01-16" ; + dcs:changeset [ + dcs:item [ + rdfs:label "Add state:loadDefaultState feature so plugins can have their default state loaded without hard-coding default state as a special case." + ] + ] + ] , [ doap:revision "1.2" ; doap:created "2012-10-14" ; doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ; diff --git a/lv2/lv2plug.in/ns/ext/state/manifest.ttl b/lv2/lv2plug.in/ns/ext/state/manifest.ttl index c350e8f..4cc3b25 100644 --- a/lv2/lv2plug.in/ns/ext/state/manifest.ttl +++ b/lv2/lv2plug.in/ns/ext/state/manifest.ttl @@ -4,5 +4,5 @@ <http://lv2plug.in/ns/ext/state> a lv2:Specification ; lv2:minorVersion 1 ; - lv2:microVersion 2 ; + lv2:microVersion 3 ; rdfs:seeAlso <state.ttl> . diff --git a/lv2/lv2plug.in/ns/ext/state/state.ttl b/lv2/lv2plug.in/ns/ext/state/state.ttl index a9b997c..699ef45 100644 --- a/lv2/lv2plug.in/ns/ext/state/state.ttl +++ b/lv2/lv2plug.in/ns/ext/state/state.ttl @@ -240,6 +240,19 @@ the properties of the state dictionary (except the property that states it has this type).</p> """ . +state:loadDefaultState + a lv2:Feature ; + lv2:documentation """ +<p>This feature indicates that the plugin has default state listed with the +state:state property which should be loaded by the host before running the +plugin. Requiring this feature allows plugins to implement a single state +loading mechanism which works for initialisation as well as restoration, +without having to hard-code default state.</p> + +<p>To support this feature, the host MUST <q>restore</q> the default state +after instantiating the plugin but before calling run().</p> +""" . + state:state a rdf:Property ; rdfs:label "state" ; diff --git a/plugins/eg-sampler.lv2/sampler.ttl b/plugins/eg-sampler.lv2/sampler.ttl index 446f5a3..072521a 100644 --- a/plugins/eg-sampler.lv2/sampler.ttl +++ b/plugins/eg-sampler.lv2/sampler.ttl @@ -38,7 +38,8 @@ lv2:project <http://lv2plug.in/ns/lv2> ; lv2:requiredFeature urid:map , work:schedule ; - lv2:optionalFeature lv2:hardRTCapable ; + lv2:optionalFeature lv2:hardRTCapable , + state:loadDefaultState ; lv2:extensionData state:interface , work:interface ; ui:ui <http://lv2plug.in/plugins/eg-sampler#ui> ; @@ -68,6 +69,9 @@ lv2:index 2 ; lv2:symbol "out" ; lv2:name "Out" + ] ; + state:state [ + <http://lv2plug.in/plugins/eg-sampler#sample> <click.wav> ] . <http://lv2plug.in/plugins/eg-sampler#ui> |