API for the LV2 specification <http://lv2plug.in/ns/lv2core>. More...
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | _LV2_Feature |
Feature. More... | |
struct | _LV2_Descriptor |
Descriptor for an LV2 Plugin. More... | |
Defines | |
#define | LV2_SYMBOL_EXPORT |
Put this (LV2_SYMBOL_EXPORT) before any functions that are to be loaded by the host as a symbol from the dynamic library. | |
Typedefs | |
typedef void * | LV2_Handle |
Plugin Handle. | |
typedef struct _LV2_Feature | LV2_Feature |
Feature. | |
typedef struct _LV2_Descriptor | LV2_Descriptor |
Descriptor for an LV2 Plugin. | |
typedef const LV2_Descriptor *(* | LV2_Descriptor_Function )(uint32_t index) |
Type of the lv2_descriptor() function in a plugin library. | |
Functions | |
const LV2_Descriptor * | lv2_descriptor (uint32_t index) |
Prototype for plugin accessor function. |
API for the LV2 specification <http://lv2plug.in/ns/lv2core>.
Revision: 3.2
#define LV2_SYMBOL_EXPORT |
Put this (LV2_SYMBOL_EXPORT) before any functions that are to be loaded by the host as a symbol from the dynamic library.
typedef void* LV2_Handle |
Plugin Handle.
This handle refers to a particular instance of a plugin. It is valid to compare to NULL (or 0 for C++) but otherwise the host MUST NOT attempt to interpret it. The plugin may use it to reference internal instance data.
typedef struct _LV2_Feature LV2_Feature |
Feature.
Features are used to provide an extensible interface to allow adding arbitrary functionality to implementations without breaking API compatibility. In particular, they may be passed by the host to the plugin's instantiate method to provide additional functionality. Extensions that describe a feature MUST specify the URI and format of data that needs to be used here. The core LV2 specification does not define any features; implementations are not required to use this facility.
typedef struct _LV2_Descriptor LV2_Descriptor |
Descriptor for an LV2 Plugin.
This structure is used to describe a plugin. It provides the functions necessary to instantiate and use a plugin.
typedef const LV2_Descriptor*(* LV2_Descriptor_Function)(uint32_t index) |
Type of the lv2_descriptor() function in a plugin library.
const LV2_Descriptor* lv2_descriptor | ( | uint32_t | index | ) |
Prototype for plugin accessor function.
The exact mechanism by which plugin libraries are loaded is host and system dependent, however all hosts need to know is the URI of the plugin they wish to load. Plugins are discovered via RDF data (not by loading plugin libraries). Documentation on best practices for plugin discovery can be found at <http://lv2plug.in>, however it is expected that hosts use a library to provide this functionality.
A plugin library MUST include a function called "lv2_descriptor" with this prototype. This function MUST have C-style linkage (if you are using C++ this is taken care of by the 'extern "C"' clause at the top of this file).
A host will find the plugin's library via RDF data, get the lv2_descriptor() function from it, and proceed from there.
Plugins are accessed by index using values from 0 upwards. Out of range indices MUST result in this function returning NULL, so the host can enumerate plugins by increasing index until NULL is returned.
Note that index has no meaning, hosts MUST NOT depend on it remaining constant in any way. In other words, index is NOT a plugin ID. In particular, hosts MUST NOT refer to plugins by library path and index in persistent serialisations (e.g. save files).