Mercurial > hg > vamp-plugin-sdk
diff examples/plugins.cpp @ 50:b907557b2fb9
* Add a structure for API versioning
author | cannam |
---|---|
date | Tue, 27 Feb 2007 12:48:17 +0000 |
parents | 31cd55174467 |
children | fa79c4ec847d |
line wrap: on
line diff
--- a/examples/plugins.cpp Mon Feb 26 18:08:48 2007 +0000 +++ b/examples/plugins.cpp Tue Feb 27 12:48:17 2007 +0000 @@ -47,8 +47,11 @@ static Vamp::PluginAdapter<PercussionOnsetDetector> percussionOnsetAdapter; static Vamp::PluginAdapter<AmplitudeFollower> amplitudeAdapter; -const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int index) +const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int version, + unsigned int index) { + if (version < 1) return 0; + switch (index) { case 0: return zeroCrossingAdapter.getDescriptor(); case 1: return spectralCentroidAdapter.getDescriptor();