comparison plugin/FeatureExtractionPluginFactory.cpp @ 1040:a1cd5abcb38b cxx11

Introduce and use a samplerate type
author Chris Cannam
date Wed, 04 Mar 2015 12:01:04 +0000
parents 7aa9088e9bcd
children c7f1300dbf64 bff23ef9407e
comparison
equal deleted inserted replaced
1039:b14064bd1f97 1040:a1cd5abcb38b
297 } 297 }
298 } 298 }
299 299
300 Vamp::Plugin * 300 Vamp::Plugin *
301 FeatureExtractionPluginFactory::instantiatePlugin(QString identifier, 301 FeatureExtractionPluginFactory::instantiatePlugin(QString identifier,
302 float inputSampleRate) 302 sv_samplerate_t inputSampleRate)
303 { 303 {
304 Profiler profiler("FeatureExtractionPluginFactory::instantiatePlugin"); 304 Profiler profiler("FeatureExtractionPluginFactory::instantiatePlugin");
305 305
306 Vamp::Plugin *rv = 0; 306 Vamp::Plugin *rv = 0;
307 Vamp::PluginHostAdapter *plugin = 0; 307 Vamp::PluginHostAdapter *plugin = 0;
355 if (!descriptor) { 355 if (!descriptor) {
356 cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Failed to find plugin \"" << label << "\" in library " << soname << endl; 356 cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Failed to find plugin \"" << label << "\" in library " << soname << endl;
357 goto done; 357 goto done;
358 } 358 }
359 359
360 plugin = new Vamp::PluginHostAdapter(descriptor, inputSampleRate); 360 plugin = new Vamp::PluginHostAdapter(descriptor, float(inputSampleRate));
361 361
362 if (plugin) { 362 if (plugin) {
363 m_handleMap[plugin] = libraryHandle; 363 m_handleMap[plugin] = libraryHandle;
364 rv = new PluginDeletionNotifyAdapter(plugin, this); 364 rv = new PluginDeletionNotifyAdapter(plugin, this);
365 } 365 }