Mercurial > hg > vamp-test-plugin
diff plugins.cpp @ 0:21d94fc628c8
Start on plugin that provides test outputs for each supported format
author | Chris Cannam |
---|---|
date | Thu, 21 Mar 2013 19:22:16 +0000 |
parents | |
children | cfff2b6ff0fd |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins.cpp Thu Mar 21 19:22:16 2013 +0000 @@ -0,0 +1,28 @@ + + +#include <vamp/vamp.h> +#include <vamp-sdk/PluginAdapter.h> + +#include "VampTestPlugin.h" + + +static Vamp::PluginAdapter<VampTestPlugin> myPluginAdapter; + + +const VampPluginDescriptor * +vampGetPluginDescriptor(unsigned int version, unsigned int index) +{ + if (version < 1) return 0; + + // Return a different plugin adaptor's descriptor for each index, + // and return 0 for the first index after you run out of plugins. + // (That's how the host finds out how many plugins are in this + // library.) + + switch (index) { + case 0: return myPluginAdapter.getDescriptor(); + default: return 0; + } +} + +