plugins/lv2_plugin.h file

LV2 Plugin API.



struct Lv2Parameter
Used temporarily to transfer data.
struct Lv2ControlChange
Control change event, sent through ring buffers for UI updates.
struct Lv2Plugin
LV2 plugin.


In order of preference.


using Lv2Plugin = struct Lv2Plugin
LV2 plugin.
using Lv2Parameter = struct Lv2Parameter
Used temporarily to transfer data.
using Lv2PluginPickUiFlag = enum Lv2PluginPickUiFlag
In order of preference.


auto lv2_plugin_create_descriptor_from_lilv(const LilvPlugin* lp) -> NONNULL PluginDescriptor*
Returns a newly allocated plugin descriptor for the given LilvPlugin if it can be hosted, otherwise NULL.
auto lv2_plugin_new_from_uri(Plugin* plugin, const char* uri, GError** error) -> Lv2Plugin*
Creates an LV2 plugin from given uri.
auto lv2_plugin_instantiate(Lv2Plugin* self, bool use_state_file, char* preset_uri, LilvState* state, GError** error) -> int
Instantiate the plugin.
auto lv2_plugin_new(Plugin* plugin) -> NONNULL Lv2Plugin*
Creates a new LV2 plugin using the given Plugin instance.
auto lv2_plugin_process(Lv2Plugin* self, const EngineProcessTimeInfo*const time_nfo) -> NONNULL void
Processes the plugin for this cycle.
auto lv2_plugin_get_latency(Lv2Plugin* pl) -> NONNULL nframes_t
Returns the plugin's latency in samples.
auto lv2_plugin_has_deprecated_ui(const char* uri) -> NONNULL char*
Returns whether the plugin has a custom UI that is deprecated (GtkUI, QtUI, etc.).
auto lv2_plugin_is_ui_supported(const char* pl_uri, const char* ui_uri) -> NONNULL bool
Returns whether the given UI uri is supported.
void lv2_plugin_get_uis(const char* pl_uri, char** uris, int* num_uris)
Returns the UI URIs that this plugin has.
auto lv2_plugin_pick_ui(const LilvUIs* uis, Lv2PluginPickUiFlag flag, const LilvUI** out_ui, const LilvNode** out_ui_type) -> bool
Pick the most preferable UI for the given flag.
auto lv2_plugin_get_ui_bundle_uri(const char* pl_uri, const char* ui_uri) -> NONNULL char*
Returns the bundle path of the UI as a URI.
auto lv2_plugin_get_ui_binary_uri(const char* pl_uri, const char* ui_uri) -> NONNULL char*
Returns the binary path of the UI as a URI.
auto lv2_plugin_pick_most_preferable_ui(const char* plugin_uri, char** out_ui, char** out_ui_type, bool allow_bridged) -> bool
Pick the most preferable UI.
void lv2_plugin_set_control(Port* port, uint32_t size, LV2_URID type, const void* body)
Ported from Lv2Control.
auto lv2_plugin_get_property_port(Lv2Plugin* self, LV2_URID property) -> NONNULL Port*
Returns the property port matching the given property URID.
auto lv2_plugin_get_port_value(const char* port_sym, void* user_data, uint32_t* size, uint32_t* type) -> const void*
Function to get a port value.
auto lv2_plugin_allocate_port_buffers(Lv2Plugin* plugin) -> NONNULL void
Allocate port buffers (only necessary for MIDI).
auto lv2_plugin_can_cleanup(const char* uri) -> NONNULL bool
Returns whether the plugin can be cleaned up (some plugins crash on cleanup).
auto lv2_plugin_populate_banks(Lv2Plugin* self) -> NONNULL void
Populates the banks in the plugin instance.
auto lv2_plugin_free(Lv2Plugin* self) -> NONNULL void
Frees the Lv2Plugin and all its components.