[−][src]Function lv2_sys::lv2_descriptor
pub unsafe extern "C" fn lv2_descriptor(index: u32) -> *const LV2_Descriptor
Prototype for plugin accessor function.
Plugins are discovered by hosts using RDF data (not by loading libraries). See http://lv2plug.in for details on the discovery process, though most hosts should use an existing library to implement this functionality.
This is the simple plugin discovery API, suitable for most statically defined plugins. Advanced plugins that need access to their bundle during discovery can use lv2_lib_descriptor() instead. Plugin libraries MUST include a function called "lv2_descriptor" or "lv2_lib_descriptor" with C-style linkage, but SHOULD provide "lv2_descriptor" wherever possible.
When it is time to load a plugin (designated by its URI), the host loads the
plugin's library, gets the lv2_descriptor() function from it, and uses this
function to find the LV2_Descriptor for the desired plugin. Plugins are
accessed by index using values from 0 upwards. This function MUST return
NULL for out of range indices, 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
consistent between loads of the plugin library.