Mercurial > hg > vamp-plugin-sdk
diff vamp-sdk/PluginAdapter.cpp @ 50:b907557b2fb9
* Add a structure for API versioning
author | cannam |
---|---|
date | Tue, 27 Feb 2007 12:48:17 +0000 |
parents | aa64a46320d4 |
children | 6683f99107cf |
line wrap: on
line diff
--- a/vamp-sdk/PluginAdapter.cpp Mon Feb 26 18:08:48 2007 +0000 +++ b/vamp-sdk/PluginAdapter.cpp Tue Feb 27 12:48:17 2007 +0000 @@ -60,9 +60,20 @@ Plugin *plugin = createPlugin(48000); + if (plugin->getVampApiVersion() != VAMP_API_VERSION) { + std::cerr << "Vamp::PluginAdapterBase::getDescriptor: ERROR: " + << "Plugin object API version " + << plugin->getVampApiVersion() + << " does not match actual API version " + << VAMP_API_VERSION << std::endl; + delete plugin; + return 0; + } + m_parameters = plugin->getParameterDescriptors(); m_programs = plugin->getPrograms(); - + + m_descriptor.vampApiVersion = plugin->getVampApiVersion(); m_descriptor.identifier = strdup(plugin->getIdentifier().c_str()); m_descriptor.name = strdup(plugin->getName().c_str()); m_descriptor.description = strdup(plugin->getDescription().c_str());