annotate libmain.cpp @ 3:991d0fe8bb27
* Add plugin entry point and make it build correctly
author |
Chris Cannam <c.cannam@qmul.ac.uk> |
date |
Thu, 06 Apr 2006 12:02:34 +0000 |
parents |
|
children |
507f923a93e8 |
rev |
line source |
c@3
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
c@3
|
2
|
c@3
|
3 /*
|
c@3
|
4 QM Vamp Plugin Set
|
c@3
|
5
|
c@3
|
6 Centre for Digital Music, Queen Mary, University of London.
|
c@3
|
7 All rights reserved.
|
c@3
|
8 */
|
c@3
|
9
|
c@3
|
10 #include <vamp/vamp.h>
|
c@3
|
11 #include <vamp-sdk/PluginAdapter.h>
|
c@3
|
12
|
c@3
|
13 #include "plugins/BeatDetect.h"
|
c@3
|
14 #include "plugins/ChromagramPlugin.h"
|
c@3
|
15 #include "plugins/TonalChangeDetect.h"
|
c@3
|
16
|
c@3
|
17 static Vamp::PluginAdapter<BeatDetector> beatDetectorAdapter;
|
c@3
|
18 static Vamp::PluginAdapter<ChromagramPlugin> chromagramPluginAdapter;
|
c@3
|
19 static Vamp::PluginAdapter<TonalChangeDetect> tonalChangeDetectorAdapter;
|
c@3
|
20
|
c@3
|
21 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int index)
|
c@3
|
22 {
|
c@3
|
23 switch (index) {
|
c@3
|
24 case 0: return beatDetectorAdapter.getDescriptor();
|
c@3
|
25 case 1: return chromagramPluginAdapter.getDescriptor();
|
c@3
|
26 case 2: return tonalChangeDetectorAdapter.getDescriptor();
|
c@3
|
27 default: return 0;
|
c@3
|
28 }
|
c@3
|
29 }
|
c@3
|
30
|