Mercurial > hg > svcore
diff transform/ModelTransformerFactory.cpp @ 1230:9ae2ce9190e6 project-file-rework
Merge
author | Chris Cannam |
---|---|
date | Tue, 25 Oct 2016 11:04:26 +0100 |
parents | ba16388b937d |
children | a99641535e02 |
line wrap: on
line diff
--- a/transform/ModelTransformerFactory.cpp Mon Oct 24 17:53:33 2016 +0100 +++ b/transform/ModelTransformerFactory.cpp Tue Oct 25 11:04:26 2016 +0100 @@ -93,17 +93,7 @@ Vamp::PluginBase *plugin = 0; - if (FeatureExtractionPluginFactory::instanceFor(id)) { - - cerr << "getConfigurationForTransform: instantiating Vamp plugin" << endl; - - Vamp::Plugin *vp = - FeatureExtractionPluginFactory::instanceFor(id)->instantiatePlugin - (id, float(inputModel->getSampleRate())); - - plugin = vp; - - } else if (RealTimePluginFactory::instanceFor(id)) { + if (RealTimePluginFactory::instanceFor(id)) { RealTimePluginFactory *factory = RealTimePluginFactory::instanceFor(id); @@ -120,6 +110,16 @@ (id, 0, 0, sampleRate, blockSize, channels); plugin = rtp; + + } else { + + cerr << "getConfigurationForTransform: instantiating Vamp plugin" << endl; + + Vamp::Plugin *vp = + FeatureExtractionPluginFactory::instance()->instantiatePlugin + (id, float(inputModel->getSampleRate())); + + plugin = vp; } if (plugin) { @@ -171,20 +171,15 @@ QString id = transforms[0].getPluginIdentifier(); - if (FeatureExtractionPluginFactory::instanceFor(id)) { - - transformer = - new FeatureExtractionModelTransformer(input, transforms); - - } else if (RealTimePluginFactory::instanceFor(id)) { + if (RealTimePluginFactory::instanceFor(id)) { transformer = new RealTimeEffectModelTransformer(input, transforms[0]); } else { - SVDEBUG << "ModelTransformerFactory::createTransformer: Unknown transform \"" - << transforms[0].getIdentifier() << "\"" << endl; - return transformer; + + transformer = + new FeatureExtractionModelTransformer(input, transforms); } if (transformer) transformer->setObjectName(transforms[0].getIdentifier());