Mercurial > hg > qm-vamp-plugins
comparison libmain.cpp @ 23:bec0d544984b
* Update to support API versioning
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Tue, 27 Feb 2007 12:29:19 +0000 |
parents | d695fc2baa91 |
children | 3256bfa04ed8 |
comparison
equal
deleted
inserted
replaced
22:6d014fb538db | 23:bec0d544984b |
---|---|
20 static Vamp::PluginAdapter<ChromagramPlugin> chromagramPluginAdapter; | 20 static Vamp::PluginAdapter<ChromagramPlugin> chromagramPluginAdapter; |
21 static Vamp::PluginAdapter<ConstantQSpectrogram> constantQAdapter; | 21 static Vamp::PluginAdapter<ConstantQSpectrogram> constantQAdapter; |
22 static Vamp::PluginAdapter<TonalChangeDetect> tonalChangeDetectorAdapter; | 22 static Vamp::PluginAdapter<TonalChangeDetect> tonalChangeDetectorAdapter; |
23 static Vamp::PluginAdapter<KeyDetector> keyDetectorAdapter; | 23 static Vamp::PluginAdapter<KeyDetector> keyDetectorAdapter; |
24 | 24 |
25 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int index) | 25 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int vampApiVersion, |
26 unsigned int index) | |
26 { | 27 { |
28 if (vampApiVersion < 1) return 0; | |
29 | |
27 switch (index) { | 30 switch (index) { |
28 case 0: return beatDetectorAdapter.getDescriptor(); | 31 case 0: return beatDetectorAdapter.getDescriptor(); |
29 case 1: return chromagramPluginAdapter.getDescriptor(); | 32 case 1: return chromagramPluginAdapter.getDescriptor(); |
30 case 2: return constantQAdapter.getDescriptor(); | 33 case 2: return constantQAdapter.getDescriptor(); |
31 case 3: return tonalChangeDetectorAdapter.getDescriptor(); | 34 case 3: return tonalChangeDetectorAdapter.getDescriptor(); |