diff vamp-sdk/PluginHostAdapter.cpp @ 15:6c5466fbea90

* fix failure to pick up all but first plugin's outputs
author cannam
date Thu, 06 Apr 2006 17:23:41 +0000
parents a3d35e11c3fe
children c29eccb892f1
line wrap: on
line diff
--- a/vamp-sdk/PluginHostAdapter.cpp	Thu Apr 06 16:36:24 2006 +0000
+++ b/vamp-sdk/PluginHostAdapter.cpp	Thu Apr 06 17:23:41 2006 +0000
@@ -44,12 +44,16 @@
     Plugin(inputSampleRate),
     m_descriptor(descriptor)
 {
-    std::cerr << "PluginHostAdapter::PluginHostAdapter (plugin = " << descriptor->name << ")" << std::endl;
+//    std::cerr << "PluginHostAdapter::PluginHostAdapter (plugin = " << descriptor->name << ")" << std::endl;
     m_handle = m_descriptor->instantiate(m_descriptor, inputSampleRate);
+    if (!m_handle) {
+//        std::cerr << "WARNING: PluginHostAdapter: Plugin instantiation failed for plugin " << m_descriptor->name << std::endl;
+    }
 }
 
 PluginHostAdapter::~PluginHostAdapter()
 {
+//    std::cerr << "PluginHostAdapter::~PluginHostAdapter (plugin = " << m_descriptor->name << ")" << std::endl;
     if (m_handle) m_descriptor->cleanup(m_handle);
 }
 
@@ -215,7 +219,10 @@
 PluginHostAdapter::getOutputDescriptors() const
 {
     OutputList list;
-    if (!m_handle) return list;
+    if (!m_handle) {
+//        std::cerr << "PluginHostAdapter::getOutputDescriptors: no handle " << std::endl;
+        return list;
+    }
 
     unsigned int count = m_descriptor->getOutputCount(m_handle);