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