Mercurial > hg > vamp-plugin-sdk
comparison 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 |
comparison
equal
deleted
inserted
replaced
49:aa64a46320d4 | 50:b907557b2fb9 |
---|---|
160 | 160 |
161 int index = 0; | 161 int index = 0; |
162 int plugnumber = -1; | 162 int plugnumber = -1; |
163 const VampPluginDescriptor *descriptor = 0; | 163 const VampPluginDescriptor *descriptor = 0; |
164 | 164 |
165 while ((descriptor = fn(index))) { | 165 while ((descriptor = fn(VAMP_API_VERSION, index))) { |
166 | 166 |
167 Vamp::PluginHostAdapter plugin(descriptor, 48000); | 167 Vamp::PluginHostAdapter plugin(descriptor, 48000); |
168 cerr << argv[0] << ": Plugin " << (index+1) | 168 cerr << argv[0] << ": Plugin " << (index+1) |
169 << " is \"" << plugin.getIdentifier() << "\"" << endl; | 169 << " is \"" << plugin.getIdentifier() << "\"" << endl; |
170 | 170 |
189 } else { | 189 } else { |
190 plugnumber = 0; | 190 plugnumber = 0; |
191 } | 191 } |
192 } | 192 } |
193 | 193 |
194 descriptor = fn(plugnumber); | 194 descriptor = fn(VAMP_API_VERSION, plugnumber); |
195 if (!descriptor) { | 195 if (!descriptor) { |
196 DLCLOSE(libraryHandle); | 196 DLCLOSE(libraryHandle); |
197 return 0; | 197 return 0; |
198 } | 198 } |
199 | 199 |
398 (handle, "vampGetPluginDescriptor"); | 398 (handle, "vampGetPluginDescriptor"); |
399 if (fn) { | 399 if (fn) { |
400 cerr << "\n " << e->d_name << ":" << endl; | 400 cerr << "\n " << e->d_name << ":" << endl; |
401 int index = 0; | 401 int index = 0; |
402 const VampPluginDescriptor *descriptor = 0; | 402 const VampPluginDescriptor *descriptor = 0; |
403 while ((descriptor = fn(index))) { | 403 while ((descriptor = fn(VAMP_API_VERSION, index))) { |
404 Vamp::PluginHostAdapter plugin(descriptor, 48000); | 404 Vamp::PluginHostAdapter plugin(descriptor, 48000); |
405 char c = char('A' + index); | 405 char c = char('A' + index); |
406 if (c > 'Z') c = char('a' + (index - 26)); | 406 if (c > 'Z') c = char('a' + (index - 26)); |
407 cerr << " [" << c << "] " | 407 cerr << " [" << c << "] [v" |
408 << plugin.getVampApiVersion() << "] " | |
408 << plugin.getName() | 409 << plugin.getName() |
409 << ", \"" << plugin.getIdentifier() << "\"" | 410 << ", \"" << plugin.getIdentifier() << "\"" |
410 << " [" << plugin.getMaker() | 411 << " [" << plugin.getMaker() |
411 << "]" << endl; | 412 << "]" << endl; |
412 if (plugin.getDescription() != "") { | 413 if (plugin.getDescription() != "") { |