Mercurial > hg > vamp-plugin-sdk
comparison vamp-hostsdk/PluginLoader.h @ 423:8c45dee08a95 vampipe
Add PluginConfiguration, PluginStaticData, and LoadRequest structures, and use them in PluginLoader
author | Chris Cannam |
---|---|
date | Thu, 12 May 2016 12:22:02 +0100 |
parents | 4ec736a36546 |
children | 5502a06537f6 |
comparison
equal
deleted
inserted
replaced
422:9a2998401bbe | 423:8c45dee08a95 |
---|---|
41 #include <string> | 41 #include <string> |
42 #include <map> | 42 #include <map> |
43 | 43 |
44 #include "hostguard.h" | 44 #include "hostguard.h" |
45 #include "PluginWrapper.h" | 45 #include "PluginWrapper.h" |
46 #include "LoadRequest.h" | |
46 | 47 |
47 _VAMP_SDK_HOSTSPACE_BEGIN(PluginLoader.h) | 48 _VAMP_SDK_HOSTSPACE_BEGIN(PluginLoader.h) |
48 | 49 |
49 namespace Vamp { | 50 namespace Vamp { |
50 | 51 |
200 Plugin *loadPlugin(PluginKey key, | 201 Plugin *loadPlugin(PluginKey key, |
201 float inputSampleRate, | 202 float inputSampleRate, |
202 int adapterFlags = 0); | 203 int adapterFlags = 0); |
203 | 204 |
204 /** | 205 /** |
206 * Load a Vamp plugin, given its key, inputSampleRate and the | |
207 * adapter flags, bundled into a LoadRequest structure. The loaded | |
208 * plugin is returned along with its static data and default | |
209 * configuration in a LoadResponse. | |
210 * | |
211 * \see AdapterFlags, PluginInputDomainAdapter, PluginChannelAdapter, LoadRequest, LoadResponse | |
212 */ | |
213 LoadResponse loadPlugin(LoadRequest req); | |
214 | |
215 /** | |
216 * Configure and initialise a Vamp plugin. This applies the | |
217 * parameter and program settings found in the supplied | |
218 * PluginConfiguration structure and initialises the plugin. (Many | |
219 * hosts will prefer to do this themselves in stages, by calling | |
220 * methods on the plugin directly.) | |
221 * | |
222 * Returns the result of calling getOutputDescriptors() on the | |
223 * configured and initialised plugin, representing the outputs of | |
224 * the plugin following configuration (since output ranges etc can | |
225 * depend on the parameters). If plugin initialisation fails, | |
226 * returns an empty list. | |
227 * | |
228 * \see PluginConfiguration | |
229 */ | |
230 Plugin::OutputList configurePlugin(Plugin *plugin, | |
231 PluginConfiguration configuration); | |
232 | |
233 /** | |
205 * Given a Vamp plugin library name and plugin identifier, return | 234 * Given a Vamp plugin library name and plugin identifier, return |
206 * the corresponding plugin key in a form suitable for passing in to | 235 * the corresponding plugin key in a form suitable for passing in to |
207 * loadPlugin(). | 236 * loadPlugin(). |
208 */ | 237 */ |
209 PluginKey composePluginKey(std::string libraryName, | 238 PluginKey composePluginKey(std::string libraryName, |