diff plugin/FeatureExtractionPluginFactory.cpp @ 1249:d45a16c232bd piper

Align Sonic Annotator with the new Piper-ified subrepos (bearing in mind we want neither Piper nor the plugin load checker in Sonic Annotator itself)
author Chris Cannam
date Fri, 04 Nov 2016 14:16:01 +0000
parents 9ae2ce9190e6
children a99641535e02
line wrap: on
line diff
--- a/plugin/FeatureExtractionPluginFactory.cpp	Thu Nov 03 15:38:17 2016 +0000
+++ b/plugin/FeatureExtractionPluginFactory.cpp	Fri Nov 04 14:16:01 2016 +0000
@@ -20,6 +20,7 @@
 #include <QMutexLocker>
 
 #include "base/Preferences.h"
+#include "base/Debug.h"
 
 FeatureExtractionPluginFactory *
 FeatureExtractionPluginFactory::instance()
@@ -31,13 +32,21 @@
     
     if (!instance) {
 
+#ifdef HAVE_PIPER
         if (Preferences::getInstance()->getRunPluginsInProcess()) {
-            cerr << "creating native instance" << endl;
+            SVDEBUG << "FeatureExtractionPluginFactory: creating native instance"
+                    << endl;
             instance = new NativeVampPluginFactory();
         } else {
-            cerr << "creating piper instance" << endl;
+            SVDEBUG << "FeatureExtractionPluginFactory: creating Piper instance"
+                    << endl;
             instance = new PiperVampPluginFactory();
         }
+#else
+        SVDEBUG << "FeatureExtractionPluginFactory: no Piper support enabled,"
+                << " creating native instance" << endl;
+        instance = new NativeVampPluginFactory();
+#endif
     }
 
     return instance;