Mercurial > hg > vamp-fanchirp
annotate plugins.cpp @ 0:d912b9d53e50
Import original code from the downloaded VampFChTCore-v1.1beta archive
author | Chris Cannam |
---|---|
date | Tue, 02 Oct 2018 10:44:42 +0100 |
parents | |
children | 0a860992b4f4 |
rev | line source |
---|---|
Chris@0 | 1 |
Chris@0 | 2 // This is a skeleton file for use in creating your own plugin |
Chris@0 | 3 // libraries. Replace MyPlugin and myPlugin throughout with the name |
Chris@0 | 4 // of your first plugin class, and fill in the gaps as appropriate. |
Chris@0 | 5 |
Chris@0 | 6 |
Chris@0 | 7 #include <vamp/vamp.h> |
Chris@0 | 8 #include <vamp-sdk/PluginAdapter.h> |
Chris@0 | 9 |
Chris@0 | 10 #include "FChTransformF0gram.h" |
Chris@0 | 11 |
Chris@0 | 12 |
Chris@0 | 13 // Declare one static adapter here for each plugin class in this library. |
Chris@0 | 14 |
Chris@0 | 15 static Vamp::PluginAdapter<FChTransformF0gram> FChTransformF0gramAdapter; |
Chris@0 | 16 |
Chris@0 | 17 |
Chris@0 | 18 // This is the entry-point for the library, and the only function that |
Chris@0 | 19 // needs to be publicly exported. |
Chris@0 | 20 |
Chris@0 | 21 const VampPluginDescriptor * |
Chris@0 | 22 vampGetPluginDescriptor(unsigned int version, unsigned int index) |
Chris@0 | 23 { |
Chris@0 | 24 if (version < 1) return 0; |
Chris@0 | 25 |
Chris@0 | 26 // Return a different plugin adaptor's descriptor for each index, |
Chris@0 | 27 // and return 0 for the first index after you run out of plugins. |
Chris@0 | 28 // (That's how the host finds out how many plugins are in this |
Chris@0 | 29 // library.) |
Chris@0 | 30 |
Chris@0 | 31 switch (index) { |
Chris@0 | 32 case 0: return FChTransformF0gramAdapter.getDescriptor(); |
Chris@0 | 33 default: return 0; |
Chris@0 | 34 } |
Chris@0 | 35 } |
Chris@0 | 36 |
Chris@0 | 37 |