diff plugin/PluginScan.cpp @ 1245:0492e54ccd56 piper

Logging; use only first ("native") helper for non-Vamp plugins
author Chris Cannam
date Tue, 01 Nov 2016 16:02:15 +0000
parents c6bdf247016a
children 75aefcc9f07d
line wrap: on
line diff
--- a/plugin/PluginScan.cpp	Tue Nov 01 15:09:44 2016 +0000
+++ b/plugin/PluginScan.cpp	Tue Nov 01 16:02:15 2016 +0000
@@ -95,10 +95,29 @@
     }
     
     QStringList candidates;
+
     for (auto kp: m_kp) {
+
         auto c = kp->getCandidateLibrariesFor(kpt);
+
+        std::cerr << "PluginScan: helper \"" << kp->getHelperExecutableName()
+                  << "\" likes " << c.size() << " libraries of type "
+                  << kp->getTagFor(kpt) << std::endl;
+
         for (auto s: c) candidates.push_back(s.c_str());
+
+        if (type != VampPlugin) {
+            // We are only interested in querying multiple helpers
+            // when dealing with Vamp plugins, for which we can use
+            // external servers and so in some cases can support
+            // additional architectures. Other plugin formats are
+            // loaded directly and so must match the host, which is
+            // what the first helper is supposed to handle -- so
+            // break after the first one if not querying Vamp
+            break;
+        }
     }
+
     return candidates;
 }