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