From 75473961a3322945dc11ddcff6d6498ec1e4d94d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 28 Oct 2006 20:05:22 +0000 Subject: Clarified lv2.h header for HostFeatures parameter, associated changes to SLV2. git-svn-id: http://svn.drobilla.net/lad/slv2@195 a436a847-0d15-0410-975c-d299462d15a1 --- slv2/lv2.h | 6 ++++-- slv2/plugininstance.h | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'slv2') diff --git a/slv2/lv2.h b/slv2/lv2.h index b3d97bf..7e3b14e 100644 --- a/slv2/lv2.h +++ b/slv2/lv2.h @@ -146,13 +146,15 @@ typedef struct _LV2_Descriptor { * found. This function must return NULL if instantiation fails. * * BundlePath is a string of the path to the plugin's .lv2 bundle - * directory, it MUST not include the trailing /. + * directory, it MUST NOT include the trailing /. * * HostFeatures is a NULL terminated array of the URIs of the LV2 * features that the host supports. Plugins may refuse to instantiate * if required features are not found here (however hosts SHOULD NOT use * this as a discovery mechanism, instead reading the data file before - * attempting to instantiate the plugin). + * attempting to instantiate the plugin). This array must always exist; + * if a host has no features, it MUST pass a single element array + * containing NULL (to simplify plugins). * * Note that instance initialisation should generally occur in * activate() rather than here. If a host calls instantiate, it MUST diff --git a/slv2/plugininstance.h b/slv2/plugininstance.h index aba3f95..553bb74 100644 --- a/slv2/plugininstance.h +++ b/slv2/plugininstance.h @@ -54,6 +54,10 @@ typedef const struct _Instance SLV2Instance; * \a plugin is not modified or directly referenced by the returned object * (instances store only a copy of the plugin's URI). * + * \a host_features NULL-terminated array of features the host supports. + * NULL may be passed if the host supports no additional features (unlike + * the LV2 specification - SLV2 takes care of it). + * * \return NULL if instantiation failed. */ SLV2Instance* -- cgit v1.2.1