annotate src/vamp-plugin-sdk-2.4/skeleton/plugins.cpp @ 169:223a55898ab9 tip default

Add null config files
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 02 Mar 2020 14:03:47 +0000
parents efb4b8187266
children
rev   line source
cannam@97 1
cannam@97 2 // This is a skeleton file for use in creating your own plugin
cannam@97 3 // libraries. Replace MyPlugin and myPlugin throughout with the name
cannam@97 4 // of your first plugin class, and fill in the gaps as appropriate.
cannam@97 5
cannam@97 6
cannam@97 7 #include <vamp/vamp.h>
cannam@97 8 #include <vamp-sdk/PluginAdapter.h>
cannam@97 9
cannam@97 10 #include "MyPlugin.h"
cannam@97 11
cannam@97 12
cannam@97 13 // Declare one static adapter here for each plugin class in this library.
cannam@97 14
cannam@97 15 static Vamp::PluginAdapter<MyPlugin> myPluginAdapter;
cannam@97 16
cannam@97 17
cannam@97 18 // This is the entry-point for the library, and the only function that
cannam@97 19 // needs to be publicly exported.
cannam@97 20
cannam@97 21 const VampPluginDescriptor *
cannam@97 22 vampGetPluginDescriptor(unsigned int version, unsigned int index)
cannam@97 23 {
cannam@97 24 if (version < 1) return 0;
cannam@97 25
cannam@97 26 // Return a different plugin adaptor's descriptor for each index,
cannam@97 27 // and return 0 for the first index after you run out of plugins.
cannam@97 28 // (That's how the host finds out how many plugins are in this
cannam@97 29 // library.)
cannam@97 30
cannam@97 31 switch (index) {
cannam@97 32 case 0: return myPluginAdapter.getDescriptor();
cannam@97 33 default: return 0;
cannam@97 34 }
cannam@97 35 }
cannam@97 36
cannam@97 37