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