Mercurial > hg > vamp-test-plugin
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:21d94fc628c8 |
---|---|
1 | |
2 | |
3 #include <vamp/vamp.h> | |
4 #include <vamp-sdk/PluginAdapter.h> | |
5 | |
6 #include "VampTestPlugin.h" | |
7 | |
8 | |
9 static Vamp::PluginAdapter<VampTestPlugin> myPluginAdapter; | |
10 | |
11 | |
12 const VampPluginDescriptor * | |
13 vampGetPluginDescriptor(unsigned int version, unsigned int index) | |
14 { | |
15 if (version < 1) return 0; | |
16 | |
17 // Return a different plugin adaptor's descriptor for each index, | |
18 // and return 0 for the first index after you run out of plugins. | |
19 // (That's how the host finds out how many plugins are in this | |
20 // library.) | |
21 | |
22 switch (index) { | |
23 case 0: return myPluginAdapter.getDescriptor(); | |
24 default: return 0; | |
25 } | |
26 } | |
27 | |
28 |