Mercurial > hg > nnls-chroma
comparison plugins.cpp @ 0:8aa2e8b3a778 matthiasm-plugin
on the way to dynamic kernel
author | matthiasm |
---|---|
date | Tue, 18 May 2010 09:29:39 +0000 |
parents | |
children | cf8898a0174c |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:8aa2e8b3a778 |
---|---|
1 | |
2 // This is a skeleton file for use in creating your own plugin | |
3 // libraries. Replace MyPlugin and myPlugin throughout with the name | |
4 // of your first plugin class, and fill in the gaps as appropriate. | |
5 | |
6 | |
7 #include <vamp/vamp.h> | |
8 #include <vamp-sdk/PluginAdapter.h> | |
9 | |
10 #include "NNLSChroma.h" | |
11 | |
12 | |
13 // Declare one static adapter here for each plugin class in this library. | |
14 | |
15 static Vamp::PluginAdapter<NNLSChroma> myPluginAdapter; | |
16 | |
17 | |
18 // This is the entry-point for the library, and the only function that | |
19 // needs to be publicly exported. | |
20 | |
21 const VampPluginDescriptor * | |
22 vampGetPluginDescriptor(unsigned int version, unsigned int index) | |
23 { | |
24 if (version < 1) return 0; | |
25 | |
26 // Return a different plugin adaptor's descriptor for each index, | |
27 // and return 0 for the first index after you run out of plugins. | |
28 // (That's how the host finds out how many plugins are in this | |
29 // library.) | |
30 | |
31 switch (index) { | |
32 case 0: return myPluginAdapter.getDescriptor(); | |
33 default: return 0; | |
34 } | |
35 } | |
36 | |
37 |