Mercurial > hg > btrack
annotate modules-and-plug-ins/vamp-plugin/plugins.cpp @ 67:ae3ec9b14092
Updated README, installation instructions for Python module and added an example.py file to explain how to use the Python module. Also regenerated documentation.
| author | Adam Stark <adamstark@users.noreply.github.com> |
|---|---|
| date | Tue, 28 Jan 2014 01:07:44 +0000 |
| parents | ce806db4468b |
| children |
| rev | line source |
|---|---|
| adamstark@61 | 1 |
| adamstark@61 | 2 // This is a skeleton file for use in creating your own plugin |
| adamstark@61 | 3 // libraries. Replace MyPlugin and myPlugin throughout with the name |
| adamstark@61 | 4 // of your first plugin class, and fill in the gaps as appropriate. |
| adamstark@61 | 5 |
| adamstark@61 | 6 |
| adamstark@61 | 7 #include <vamp/vamp.h> |
| adamstark@61 | 8 #include <vamp-sdk/PluginAdapter.h> |
| adamstark@61 | 9 |
| adamstark@61 | 10 #include "BTrackVamp.h" |
| adamstark@61 | 11 |
| adamstark@61 | 12 |
| adamstark@61 | 13 // Declare one static adapter here for each plugin class in this library. |
| adamstark@61 | 14 |
| adamstark@61 | 15 static Vamp::PluginAdapter<BTrackVamp> btrackVampAdapter; |
| adamstark@61 | 16 |
| adamstark@61 | 17 |
| adamstark@61 | 18 // This is the entry-point for the library, and the only function that |
| adamstark@61 | 19 // needs to be publicly exported. |
| adamstark@61 | 20 |
| adamstark@61 | 21 const VampPluginDescriptor * |
| adamstark@61 | 22 vampGetPluginDescriptor(unsigned int version, unsigned int index) |
| adamstark@61 | 23 { |
| adamstark@61 | 24 if (version < 1) return 0; |
| adamstark@61 | 25 |
| adamstark@61 | 26 // Return a different plugin adaptor's descriptor for each index, |
| adamstark@61 | 27 // and return 0 for the first index after you run out of plugins. |
| adamstark@61 | 28 // (That's how the host finds out how many plugins are in this |
| adamstark@61 | 29 // library.) |
| adamstark@61 | 30 |
| adamstark@61 | 31 switch (index) { |
| adamstark@61 | 32 case 0: return btrackVampAdapter.getDescriptor(); |
| adamstark@61 | 33 default: return 0; |
| adamstark@61 | 34 } |
| adamstark@61 | 35 } |
| adamstark@61 | 36 |
| adamstark@61 | 37 |
