Mercurial > hg > vamp-tempogram
comparison plugins.cpp @ 43:4cf2d163127b
Copyrights and tidying
author | Chris Cannam |
---|---|
date | Thu, 25 Sep 2014 15:13:45 +0100 |
parents | c11367df624d |
children |
comparison
equal
deleted
inserted
replaced
42:d4b74059a005 | 43:4cf2d163127b |
---|---|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | |
1 | 2 |
2 // This is a skeleton file for use in creating your own plugin | 3 /* |
3 // libraries. Replace MyPlugin and myPlugin throughout with the name | 4 Vamp Tempogram Plugin |
4 // of your first plugin class, and fill in the gaps as appropriate. | 5 Carl Bussey, Centre for Digital Music, Queen Mary University of London |
5 | 6 Copyright 2014 Queen Mary University of London. |
7 | |
8 This program is free software; you can redistribute it and/or | |
9 modify it under the terms of the GNU General Public License as | |
10 published by the Free Software Foundation; either version 2 of the | |
11 License, or (at your option) any later version. See the file | |
12 COPYING included with this distribution for more information. | |
13 */ | |
6 | 14 |
7 #include <vamp/vamp.h> | 15 #include <vamp/vamp.h> |
8 #include <vamp-sdk/PluginAdapter.h> | 16 #include <vamp-sdk/PluginAdapter.h> |
9 | 17 |
10 #include "TempogramPlugin.h" | 18 #include "TempogramPlugin.h" |
11 | 19 |
12 | |
13 // Declare one static adapter here for each plugin class in this library. | |
14 | |
15 static Vamp::PluginAdapter<TempogramPlugin> myPluginAdapter; | 20 static Vamp::PluginAdapter<TempogramPlugin> myPluginAdapter; |
16 | 21 |
17 | |
18 // This is the entry-point for the library, and the only function that | |
19 // needs to be publicly exported. | |
20 | 22 |
21 const VampPluginDescriptor * | 23 const VampPluginDescriptor * |
22 vampGetPluginDescriptor(unsigned int version, unsigned int index) | 24 vampGetPluginDescriptor(unsigned int version, unsigned int index) |
23 { | 25 { |
24 if (version < 1) return 0; | 26 if (version < 1) return 0; |
25 | |
26 // Return a different plugin adaptor's descriptor for each index, | |
27 // and return 0 for the first index after you run out of plugins. | |
28 // (That's how the host finds out how many plugins are in this | |
29 // library.) | |
30 | 27 |
31 switch (index) { | 28 switch (index) { |
32 case 0: return myPluginAdapter.getDescriptor(); | 29 case 0: return myPluginAdapter.getDescriptor(); |
33 default: return 0; | 30 default: return 0; |
34 } | 31 } |