LV2  1.0.13
Modules | Data Structures | Typedefs | Macros
Atom

Detailed Description

A generic value container and several data types, see http://lv2plug.in/ns/ext/atom for details.

Modules

 Forge
 
 Utilities
 

Data Structures

struct  LV2_Atom
 
struct  LV2_Atom_Int
 
struct  LV2_Atom_Long
 
struct  LV2_Atom_Float
 
struct  LV2_Atom_Double
 
struct  LV2_Atom_URID
 
struct  LV2_Atom_String
 
struct  LV2_Atom_Literal_Body
 
struct  LV2_Atom_Literal
 
struct  LV2_Atom_Tuple
 
struct  LV2_Atom_Vector_Body
 
struct  LV2_Atom_Vector
 
struct  LV2_Atom_Property_Body
 
struct  LV2_Atom_Property
 
struct  LV2_Atom_Object_Body
 
struct  LV2_Atom_Object
 
struct  LV2_Atom_Event
 
struct  LV2_Atom_Sequence_Body
 
struct  LV2_Atom_Sequence
 

Typedefs

typedef char lv2_atom_assert_double_fits_in_64_bits[((sizeof(double)<=sizeof(uint64_t)) *2) - 1]
 
typedef LV2_Atom_Int LV2_Atom_Bool
 

Macros

#define LV2_ATOM_URI   "http://lv2plug.in/ns/ext/atom"
 
#define LV2_ATOM_PREFIX   LV2_ATOM_URI "#"
 
#define LV2_ATOM__Atom   LV2_ATOM_PREFIX "Atom"
 
#define LV2_ATOM__AtomPort   LV2_ATOM_PREFIX "AtomPort"
 
#define LV2_ATOM__Blank   LV2_ATOM_PREFIX "Blank"
 
#define LV2_ATOM__Bool   LV2_ATOM_PREFIX "Bool"
 
#define LV2_ATOM__Chunk   LV2_ATOM_PREFIX "Chunk"
 
#define LV2_ATOM__Double   LV2_ATOM_PREFIX "Double"
 
#define LV2_ATOM__Event   LV2_ATOM_PREFIX "Event"
 
#define LV2_ATOM__Float   LV2_ATOM_PREFIX "Float"
 
#define LV2_ATOM__Int   LV2_ATOM_PREFIX "Int"
 
#define LV2_ATOM__Literal   LV2_ATOM_PREFIX "Literal"
 
#define LV2_ATOM__Long   LV2_ATOM_PREFIX "Long"
 
#define LV2_ATOM__Number   LV2_ATOM_PREFIX "Number"
 
#define LV2_ATOM__Object   LV2_ATOM_PREFIX "Object"
 
#define LV2_ATOM__Path   LV2_ATOM_PREFIX "Path"
 
#define LV2_ATOM__Property   LV2_ATOM_PREFIX "Property"
 
#define LV2_ATOM__Resource   LV2_ATOM_PREFIX "Resource"
 
#define LV2_ATOM__Sequence   LV2_ATOM_PREFIX "Sequence"
 
#define LV2_ATOM__Sound   LV2_ATOM_PREFIX "Sound"
 
#define LV2_ATOM__String   LV2_ATOM_PREFIX "String"
 
#define LV2_ATOM__Tuple   LV2_ATOM_PREFIX "Tuple"
 
#define LV2_ATOM__URI   LV2_ATOM_PREFIX "URI"
 
#define LV2_ATOM__URID   LV2_ATOM_PREFIX "URID"
 
#define LV2_ATOM__Vector   LV2_ATOM_PREFIX "Vector"
 
#define LV2_ATOM__atomTransfer   LV2_ATOM_PREFIX "atomTransfer"
 
#define LV2_ATOM__beatTime   LV2_ATOM_PREFIX "beatTime"
 
#define LV2_ATOM__bufferType   LV2_ATOM_PREFIX "bufferType"
 
#define LV2_ATOM__childType   LV2_ATOM_PREFIX "childType"
 
#define LV2_ATOM__eventTransfer   LV2_ATOM_PREFIX "eventTransfer"
 
#define LV2_ATOM__frameTime   LV2_ATOM_PREFIX "frameTime"
 
#define LV2_ATOM__supports   LV2_ATOM_PREFIX "supports"
 
#define LV2_ATOM__timeUnit   LV2_ATOM_PREFIX "timeUnit"
 
#define LV2_ATOM_REFERENCE_TYPE   0
 
#define LV2_ATOM_CONTENTS(type, atom)   ((void*)((uint8_t*)(atom) + sizeof(type)))
 
#define LV2_ATOM_CONTENTS_CONST(type, atom)   ((const void*)((const uint8_t*)(atom) + sizeof(type)))
 
#define LV2_ATOM_BODY(atom)   LV2_ATOM_CONTENTS(LV2_Atom, atom)
 
#define LV2_ATOM_BODY_CONST(atom)   LV2_ATOM_CONTENTS_CONST(LV2_Atom, atom)
 

Data Structure Documentation

◆ LV2_Atom

struct LV2_Atom

The header of an atom:Atom.

Data Fields

uint32_t size
 
uint32_t type
 

Field Documentation

◆ size

uint32_t LV2_Atom::size

Size in bytes, not including type and size.

◆ type

uint32_t LV2_Atom::type

Type of this atom (mapped URI).

◆ LV2_Atom_Int

struct LV2_Atom_Int

An atom:Int or atom:Bool.

May be cast to LV2_Atom.

Data Fields

LV2_Atom atom
 
int32_t body
 

Field Documentation

◆ atom

LV2_Atom LV2_Atom_Int::atom

Atom header.

◆ body

int32_t LV2_Atom_Int::body

Integer value.

◆ LV2_Atom_Long

struct LV2_Atom_Long

An atom:Long.

May be cast to LV2_Atom.

Data Fields

LV2_Atom atom
 
int64_t body
 

Field Documentation

◆ atom

LV2_Atom LV2_Atom_Long::atom

Atom header.

◆ body

int64_t LV2_Atom_Long::body

Integer value.

◆ LV2_Atom_Float

struct LV2_Atom_Float

An atom:Float.

May be cast to LV2_Atom.

Data Fields

LV2_Atom atom
 
float body
 

Field Documentation

◆ atom

LV2_Atom LV2_Atom_Float::atom

Atom header.

◆ body

float LV2_Atom_Float::body

Floating point value.

◆ LV2_Atom_Double

struct LV2_Atom_Double

An atom:Double.

May be cast to LV2_Atom.

Data Fields

LV2_Atom atom
 
double body
 

Field Documentation

◆ atom

LV2_Atom LV2_Atom_Double::atom

Atom header.

◆ body

double LV2_Atom_Double::body

Floating point value.

◆ LV2_Atom_URID

struct LV2_Atom_URID

An atom:URID.

May be cast to LV2_Atom.

Data Fields

LV2_Atom atom
 
uint32_t body
 

Field Documentation

◆ atom

LV2_Atom LV2_Atom_URID::atom

Atom header.

◆ body

uint32_t LV2_Atom_URID::body

URID.

◆ LV2_Atom_String

struct LV2_Atom_String

An atom:String.

May be cast to LV2_Atom.

Data Fields

LV2_Atom atom
 

Field Documentation

◆ atom

LV2_Atom LV2_Atom_String::atom

Atom header.

◆ LV2_Atom_Literal_Body

struct LV2_Atom_Literal_Body

The body of an atom:Literal.

Data Fields

uint32_t datatype
 
uint32_t lang
 

Field Documentation

◆ datatype

uint32_t LV2_Atom_Literal_Body::datatype

Datatype URID.

◆ lang

uint32_t LV2_Atom_Literal_Body::lang

Language URID.

◆ LV2_Atom_Literal

struct LV2_Atom_Literal

An atom:Literal.

May be cast to LV2_Atom.

Data Fields

LV2_Atom atom
 
LV2_Atom_Literal_Body body
 

Field Documentation

◆ atom

LV2_Atom LV2_Atom_Literal::atom

Atom header.

◆ body

LV2_Atom_Literal_Body LV2_Atom_Literal::body

Body.

◆ LV2_Atom_Tuple

struct LV2_Atom_Tuple

An atom:Tuple.

May be cast to LV2_Atom.

Data Fields

LV2_Atom atom
 

Field Documentation

◆ atom

LV2_Atom LV2_Atom_Tuple::atom

Atom header.

◆ LV2_Atom_Vector_Body

struct LV2_Atom_Vector_Body

The body of an atom:Vector.

Data Fields

uint32_t child_size
 
uint32_t child_type
 

Field Documentation

◆ child_size

uint32_t LV2_Atom_Vector_Body::child_size

The size of each element in the vector.

◆ child_type

uint32_t LV2_Atom_Vector_Body::child_type

The type of each element in the vector.

◆ LV2_Atom_Vector

struct LV2_Atom_Vector

An atom:Vector.

May be cast to LV2_Atom.

Data Fields

LV2_Atom atom
 
LV2_Atom_Vector_Body body
 

Field Documentation

◆ atom

LV2_Atom LV2_Atom_Vector::atom

Atom header.

◆ body

LV2_Atom_Vector_Body LV2_Atom_Vector::body

Body.

◆ LV2_Atom_Property_Body

struct LV2_Atom_Property_Body

The body of an atom:Property (e.g.

in an atom:Object).

Data Fields

uint32_t key
 
uint32_t context
 
LV2_Atom value
 

Field Documentation

◆ key

uint32_t LV2_Atom_Property_Body::key

Key (predicate) (mapped URI).

◆ context

uint32_t LV2_Atom_Property_Body::context

Context URID (may be, and generally is, 0).

◆ value

LV2_Atom LV2_Atom_Property_Body::value

Value atom header.

◆ LV2_Atom_Property

struct LV2_Atom_Property

An atom:Property.

May be cast to LV2_Atom.

Data Fields

LV2_Atom atom
 
LV2_Atom_Property_Body body
 

Field Documentation

◆ atom

LV2_Atom LV2_Atom_Property::atom

Atom header.

◆ body

LV2_Atom_Property_Body LV2_Atom_Property::body

Body.

◆ LV2_Atom_Object_Body

struct LV2_Atom_Object_Body

The body of an atom:Object.

May be cast to LV2_Atom.

Data Fields

uint32_t id
 
uint32_t otype
 

Field Documentation

◆ id

uint32_t LV2_Atom_Object_Body::id

URID, or 0 for blank.

◆ otype

uint32_t LV2_Atom_Object_Body::otype

Type URID (same as rdf:type, for fast dispatch).

◆ LV2_Atom_Object

struct LV2_Atom_Object

An atom:Object.

May be cast to LV2_Atom.

Data Fields

LV2_Atom atom
 
LV2_Atom_Object_Body body
 

Field Documentation

◆ atom

LV2_Atom LV2_Atom_Object::atom

Atom header.

◆ body

LV2_Atom_Object_Body LV2_Atom_Object::body

Body.

◆ LV2_Atom_Event

struct LV2_Atom_Event

The header of an atom:Event.

Note this type is NOT an LV2_Atom.

Data Fields

union {
   int64_t   frames
 
   double   beats
 
time
 
LV2_Atom body
 

Field Documentation

◆ frames

int64_t LV2_Atom_Event::frames

Time in audio frames.

◆ beats

double LV2_Atom_Event::beats

Time in beats.

◆ time

union { ... } LV2_Atom_Event::time

Time stamp.

Which type is valid is determined by context.

◆ body

LV2_Atom LV2_Atom_Event::body

Event body atom header.

◆ LV2_Atom_Sequence_Body

struct LV2_Atom_Sequence_Body

The body of an atom:Sequence (a sequence of events).

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 audio frames.

The contents of a sequence is a series of LV2_Atom_Event, each aligned to 64-bits, e.g.:

| Event 1 (size 6)                              | Event 2
|       |       |       |       |       |       |       |       |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|FRAMES |SUBFRMS|TYPE   |SIZE   |DATADATADATAPAD|FRAMES |SUBFRMS|...

Data Fields

uint32_t unit
 
uint32_t pad
 

Field Documentation

◆ unit

uint32_t LV2_Atom_Sequence_Body::unit

URID of unit of event time stamps.

◆ pad

uint32_t LV2_Atom_Sequence_Body::pad

Currently unused.

◆ LV2_Atom_Sequence

struct LV2_Atom_Sequence

An atom:Sequence.

Data Fields

LV2_Atom atom
 
LV2_Atom_Sequence_Body body
 

Field Documentation

◆ atom

LV2_Atom LV2_Atom_Sequence::atom

Atom header.

◆ body

LV2_Atom_Sequence_Body LV2_Atom_Sequence::body

Body.

Macro Definition Documentation

◆ LV2_ATOM_URI

#define LV2_ATOM_URI   "http://lv2plug.in/ns/ext/atom"

◆ LV2_ATOM_PREFIX

#define LV2_ATOM_PREFIX   LV2_ATOM_URI "#"

◆ LV2_ATOM__Atom

#define LV2_ATOM__Atom   LV2_ATOM_PREFIX "Atom"

◆ LV2_ATOM__AtomPort

#define LV2_ATOM__AtomPort   LV2_ATOM_PREFIX "AtomPort"

◆ LV2_ATOM__Blank

#define LV2_ATOM__Blank   LV2_ATOM_PREFIX "Blank"

◆ LV2_ATOM__Bool

#define LV2_ATOM__Bool   LV2_ATOM_PREFIX "Bool"

◆ LV2_ATOM__Chunk

#define LV2_ATOM__Chunk   LV2_ATOM_PREFIX "Chunk"

◆ LV2_ATOM__Double

#define LV2_ATOM__Double   LV2_ATOM_PREFIX "Double"

◆ LV2_ATOM__Event

#define LV2_ATOM__Event   LV2_ATOM_PREFIX "Event"

◆ LV2_ATOM__Float

#define LV2_ATOM__Float   LV2_ATOM_PREFIX "Float"

◆ LV2_ATOM__Int

#define LV2_ATOM__Int   LV2_ATOM_PREFIX "Int"

◆ LV2_ATOM__Literal

#define LV2_ATOM__Literal   LV2_ATOM_PREFIX "Literal"

◆ LV2_ATOM__Long

#define LV2_ATOM__Long   LV2_ATOM_PREFIX "Long"

◆ LV2_ATOM__Number

#define LV2_ATOM__Number   LV2_ATOM_PREFIX "Number"

◆ LV2_ATOM__Object

#define LV2_ATOM__Object   LV2_ATOM_PREFIX "Object"

◆ LV2_ATOM__Path

#define LV2_ATOM__Path   LV2_ATOM_PREFIX "Path"

◆ LV2_ATOM__Property

#define LV2_ATOM__Property   LV2_ATOM_PREFIX "Property"

◆ LV2_ATOM__Resource

#define LV2_ATOM__Resource   LV2_ATOM_PREFIX "Resource"

◆ LV2_ATOM__Sequence

#define LV2_ATOM__Sequence   LV2_ATOM_PREFIX "Sequence"

◆ LV2_ATOM__Sound

#define LV2_ATOM__Sound   LV2_ATOM_PREFIX "Sound"

◆ LV2_ATOM__String

#define LV2_ATOM__String   LV2_ATOM_PREFIX "String"

◆ LV2_ATOM__Tuple

#define LV2_ATOM__Tuple   LV2_ATOM_PREFIX "Tuple"

◆ LV2_ATOM__URI

#define LV2_ATOM__URI   LV2_ATOM_PREFIX "URI"

◆ LV2_ATOM__URID

#define LV2_ATOM__URID   LV2_ATOM_PREFIX "URID"

◆ LV2_ATOM__Vector

#define LV2_ATOM__Vector   LV2_ATOM_PREFIX "Vector"

◆ LV2_ATOM__atomTransfer

#define LV2_ATOM__atomTransfer   LV2_ATOM_PREFIX "atomTransfer"

◆ LV2_ATOM__beatTime

#define LV2_ATOM__beatTime   LV2_ATOM_PREFIX "beatTime"

◆ LV2_ATOM__bufferType

#define LV2_ATOM__bufferType   LV2_ATOM_PREFIX "bufferType"

◆ LV2_ATOM__childType

#define LV2_ATOM__childType   LV2_ATOM_PREFIX "childType"

◆ LV2_ATOM__eventTransfer

#define LV2_ATOM__eventTransfer   LV2_ATOM_PREFIX "eventTransfer"

◆ LV2_ATOM__frameTime

#define LV2_ATOM__frameTime   LV2_ATOM_PREFIX "frameTime"

◆ LV2_ATOM__supports

#define LV2_ATOM__supports   LV2_ATOM_PREFIX "supports"

◆ LV2_ATOM__timeUnit

#define LV2_ATOM__timeUnit   LV2_ATOM_PREFIX "timeUnit"

◆ LV2_ATOM_REFERENCE_TYPE

#define LV2_ATOM_REFERENCE_TYPE   0

◆ LV2_ATOM_CONTENTS

#define LV2_ATOM_CONTENTS (   type,
  atom 
)    ((void*)((uint8_t*)(atom) + sizeof(type)))

Return a pointer to the contents of an Atom.

The "contents" of an atom is the data past the complete type-specific header.

Parameters
typeThe type of the atom, e.g. LV2_Atom_String.
atomA variable-sized atom.

◆ LV2_ATOM_CONTENTS_CONST

#define LV2_ATOM_CONTENTS_CONST (   type,
  atom 
)    ((const void*)((const uint8_t*)(atom) + sizeof(type)))

Const version of LV2_ATOM_CONTENTS.

◆ LV2_ATOM_BODY

#define LV2_ATOM_BODY (   atom)    LV2_ATOM_CONTENTS(LV2_Atom, atom)

Return a pointer to the body of an Atom.

The "body" of an atom is the data just past the LV2_Atom head (i.e. the same offset for all types).

◆ LV2_ATOM_BODY_CONST

#define LV2_ATOM_BODY_CONST (   atom)    LV2_ATOM_CONTENTS_CONST(LV2_Atom, atom)

Const version of LV2_ATOM_BODY.

Typedef Documentation

◆ lv2_atom_assert_double_fits_in_64_bits

typedef char lv2_atom_assert_double_fits_in_64_bits[((sizeof(double)<=sizeof(uint64_t)) *2) - 1]

This expression will fail to compile if double does not fit in 64 bits.

◆ LV2_Atom_Bool

An atom:Bool.

May be cast to LV2_Atom.