diff framework/TransformUserConfigurator.cpp @ 529:7a3fa603190e 3.0-integration

Restore native-Vamp factory and make the choice between Piper and Native a preference
author Chris Cannam
date Fri, 21 Oct 2016 11:49:27 +0100
parents 167fe01d5631
children 36aa947ec962
line wrap: on
line diff
--- a/framework/TransformUserConfigurator.cpp	Thu Oct 20 14:07:06 2016 +0100
+++ b/framework/TransformUserConfigurator.cpp	Fri Oct 21 11:49:27 2016 +0100
@@ -80,28 +80,7 @@
 
     if (!plugin) return false;
 
-    if (FeatureExtractionPluginFactory::instanceFor(id)) {
-
-        Vamp::Plugin *vp = static_cast<Vamp::Plugin *>(plugin);
-
-	frequency = (vp->getInputDomain() == Vamp::Plugin::FrequencyDomain);
-
-	std::vector<Vamp::Plugin::OutputDescriptor> od =
-	    vp->getOutputDescriptors();
-
-	cerr << "configure: looking for output: " << output << endl;
-
-	if (od.size() > 1) {
-	    for (size_t i = 0; i < od.size(); ++i) {
-		if (od[i].identifier == output.toStdString()) {
-		    outputLabel = od[i].name.c_str();
-		    outputDescription = od[i].description.c_str();
-		    break;
-		}
-	    }
-        }
-
-    } else if (RealTimePluginFactory::instanceFor(id)) {
+    if (RealTimePluginFactory::instanceFor(id)) {
 
         RealTimePluginFactory *factory = RealTimePluginFactory::instanceFor(id);
         const RealTimePluginDescriptor *desc = factory->getPluginDescriptor(id);
@@ -130,8 +109,29 @@
 	    SVDEBUG << "Setting auditioning effect" << endl;
             source->setAuditioningEffect(rtp);
         }
+
+    } else {
+
+        Vamp::Plugin *vp = static_cast<Vamp::Plugin *>(plugin);
+
+	frequency = (vp->getInputDomain() == Vamp::Plugin::FrequencyDomain);
+
+	std::vector<Vamp::Plugin::OutputDescriptor> od =
+	    vp->getOutputDescriptors();
+
+	cerr << "configure: looking for output: " << output << endl;
+
+	if (od.size() > 1) {
+	    for (size_t i = 0; i < od.size(); ++i) {
+		if (od[i].identifier == output.toStdString()) {
+		    outputLabel = od[i].name.c_str();
+		    outputDescription = od[i].description.c_str();
+		    break;
+		}
+	    }
+        }
     }
-
+    
     int sourceChannels = 1;
     if (dynamic_cast<DenseTimeValueModel *>(inputModel)) {
 	sourceChannels = dynamic_cast<DenseTimeValueModel *>(inputModel)