Chris@12: 
Chris@12: // This is a skeleton file for use in creating your own plugin
Chris@12: // libraries.  Replace MyPlugin and myPlugin throughout with the name
Chris@12: // of your first plugin class, and fill in the gaps as appropriate.
Chris@12: 
Chris@12: 
Chris@12: #include <vamp/vamp.h>
Chris@12: #include <vamp-sdk/PluginAdapter.h>
Chris@12: 
Chris@12: #include "MyPlugin.h"
Chris@12: 
Chris@12: 
Chris@12: // Declare one static adapter here for each plugin class in this library.
Chris@12: 
Chris@12: static Vamp::PluginAdapter<MyPlugin> myPluginAdapter;
Chris@12: 
Chris@12: 
Chris@12: // This is the entry-point for the library, and the only function that
Chris@12: // needs to be publicly exported.
Chris@12: 
Chris@12: const VampPluginDescriptor *
Chris@12: vampGetPluginDescriptor(unsigned int version, unsigned int index)
Chris@12: {
Chris@12:     if (version < 1) return 0;
Chris@12: 
Chris@12:     // Return a different plugin adaptor's descriptor for each index,
Chris@12:     // and return 0 for the first index after you run out of plugins.
Chris@12:     // (That's how the host finds out how many plugins are in this
Chris@12:     // library.)
Chris@12: 
Chris@12:     switch (index) {
Chris@12:     case  0: return myPluginAdapter.getDescriptor();
Chris@12:     default: return 0;
Chris@12:     }
Chris@12: }
Chris@12: 
Chris@12: