diff options
Diffstat (limited to 'lv2/lv2plug.in/ns')
-rw-r--r-- | lv2/lv2plug.in/ns/ext/atom/atom.h | 11 | ||||
-rw-r--r-- | lv2/lv2plug.in/ns/ext/atom/atom.ttl | 28 | ||||
-rw-r--r-- | lv2/lv2plug.in/ns/ext/atom/forge.h | 6 |
3 files changed, 37 insertions, 8 deletions
diff --git a/lv2/lv2plug.in/ns/ext/atom/atom.h b/lv2/lv2plug.in/ns/ext/atom/atom.h index bea9197..5c0b3fd 100644 --- a/lv2/lv2plug.in/ns/ext/atom/atom.h +++ b/lv2/lv2plug.in/ns/ext/atom/atom.h @@ -180,6 +180,11 @@ typedef struct { This is used as the contents of an atom:EventPort, but is a generic Atom type which can be used anywhere. + The unit field is either a URID that described an appropriate time stamp + type, or may be 0 where a default stamp type is known. For + LV2_Descriptor::run(), the default stamp type is atom:AudioFrames, i.e. + LV2_Atom_Audio_Time. + The contents of a sequence is a series of LV2_Atom_Event, each aligned to 64-bits, e.g.: <pre> @@ -190,9 +195,9 @@ typedef struct { </pre> */ typedef struct { - LV2_Atom atom; /**< Atom header. */ - uint32_t capacity; /**< Maximum size of contents. */ - uint32_t time_type; /**< URID type of event time stamps. */ + LV2_Atom atom; /**< Atom header. */ + uint32_t unit; /**< URID of unit of event time stamps. */ + uint32_t pad; /**< Currently unused. */ /* Contents (a series of events) follow here. */ } LV2_Atom_Sequence; diff --git a/lv2/lv2plug.in/ns/ext/atom/atom.ttl b/lv2/lv2plug.in/ns/ext/atom/atom.ttl index 7d534d0..4d87ce5 100644 --- a/lv2/lv2plug.in/ns/ext/atom/atom.ttl +++ b/lv2/lv2plug.in/ns/ext/atom/atom.ttl @@ -114,7 +114,7 @@ atom:Bang a rdfs:Class ; rdfs:subClassOf atom:Atom ; rdfs:label "Bang" ; - rdfs:comment "Generic activity or trigger, with no body." . + rdfs:comment "Generic activity or trigger, with no body." . atom:Number a rdfs:Class ; @@ -322,7 +322,31 @@ atom:Blank The ID of a Blank is valid only within the context the Blank appears in. For ports this is the context of the associated run() call, i.e. all ports share the same context so outputs can contain IDs that correspond to IDs of blanks in -the input.</p> """ . +the input.</p> +""" . + +atom:TimeUnit + a rdfs:Class ; + rdfs:label "Time Unit" ; + lv2:documentation "<p>A unit for atom:Event time stamps.</p>" . + +atom:AudioFrames + a rdfs:Class ; + rdfs:subClassOf atom:TimeUnit ; + rdfs:label "Audio frames" ; + lv2:documentation """ +<p>Time in audio frames. Converting this to absolute time depends on the +sample rate. When this is the stamp unit for an atom:Sequence, the events in +that sequence have LV2_Atom_Audio_Time stamps (<code>event.time.audio</code>)</p>""" . + +atom:Beats + a rdfs:Class ; + rdfs:subClassOf atom:TimeUnit ; + rdfs:label "Beats" ; + lv2:documentation """ +<p>Time in beats. Converting this to absolute time depends on the tempo. When +this is the stamp unit for an atom:Sequence, the events in that sequence have a +<code>double</code> stamp (<code>event.time.beats</code>).</p>""" . atom:Event a rdfs:Class ; diff --git a/lv2/lv2plug.in/ns/ext/atom/forge.h b/lv2/lv2plug.in/ns/ext/atom/forge.h index 08c1961..78c7873 100644 --- a/lv2/lv2plug.in/ns/ext/atom/forge.h +++ b/lv2/lv2plug.in/ns/ext/atom/forge.h @@ -410,15 +410,15 @@ static inline LV2_Atom_Sequence* lv2_atom_forge_sequence_head(LV2_Atom_Forge* forge, LV2_Atom* parent, uint32_t capacity, - uint32_t time_type) + uint32_t unit) { LV2_Atom_Sequence* out = (LV2_Atom_Sequence*) lv2_atom_forge_reserve(forge, parent, sizeof(LV2_Atom_Sequence)); if (out) { out->atom.type = forge->Sequence; out->atom.size = sizeof(LV2_Atom_Sequence) - sizeof(LV2_Atom); - out->capacity = capacity; - out->time_type = 0; + out->unit = unit; + out->pad = 0; } return out; } |