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