diff host/vamp-simple-host.cpp @ 50:b907557b2fb9

* Add a structure for API versioning
author cannam
date Tue, 27 Feb 2007 12:48:17 +0000
parents aa64a46320d4
children d3995d2b5e08
line wrap: on
line diff
--- a/host/vamp-simple-host.cpp	Mon Feb 26 18:08:48 2007 +0000
+++ b/host/vamp-simple-host.cpp	Tue Feb 27 12:48:17 2007 +0000
@@ -162,7 +162,7 @@
     int plugnumber = -1;
     const VampPluginDescriptor *descriptor = 0;
 
-    while ((descriptor = fn(index))) {
+    while ((descriptor = fn(VAMP_API_VERSION, index))) {
 
         Vamp::PluginHostAdapter plugin(descriptor, 48000);
         cerr << argv[0] << ": Plugin " << (index+1)
@@ -191,7 +191,7 @@
         }
     }
 
-    descriptor = fn(plugnumber);
+    descriptor = fn(VAMP_API_VERSION, plugnumber);
     if (!descriptor) {
         DLCLOSE(libraryHandle);
         return 0;
@@ -400,11 +400,12 @@
                     cerr << "\n  " << e->d_name << ":" << endl;
                     int index = 0;
                     const VampPluginDescriptor *descriptor = 0;
-                    while ((descriptor = fn(index))) {
+                    while ((descriptor = fn(VAMP_API_VERSION, index))) {
                         Vamp::PluginHostAdapter plugin(descriptor, 48000);
                         char c = char('A' + index);
                         if (c > 'Z') c = char('a' + (index - 26));
-                        cerr << "    [" << c << "] "
+                        cerr << "    [" << c << "] [v"
+                             << plugin.getVampApiVersion() << "] "
                              << plugin.getName()
                              << ", \"" << plugin.getIdentifier() << "\""
                              << " [" << plugin.getMaker()