diff transform/RealTimePluginTransform.cpp @ 34:8ad306d8a568

* Pull transforms out of Layer menu (again) and into a separate Transforms menu * Add Recent Transforms submenu * Add effects and generators to the transforms menu (not yet implemented) as well as analysis plugins and data-from-effects (control output ports) * Add a nice dictionary-volume-style alphabetic subdivision of plugin names in plugins By Name menus
author Chris Cannam
date Fri, 22 Sep 2006 16:12:23 +0000
parents 61259228d029
children f18093617b78
line wrap: on
line diff
--- a/transform/RealTimePluginTransform.cpp	Thu Sep 21 16:43:50 2006 +0000
+++ b/transform/RealTimePluginTransform.cpp	Fri Sep 22 16:12:23 2006 +0000
@@ -66,17 +66,24 @@
         PluginXml(m_plugin).setParametersFromXml(configurationXml);
     }
 
-    if (m_outputNo >= m_plugin->getControlOutputCount()) {
+    if (m_outputNo >= 0 && m_outputNo >= m_plugin->getControlOutputCount()) {
         std::cerr << "RealTimePluginTransform: Plugin has fewer than desired " << m_outputNo << " control outputs" << std::endl;
         return;
     }
+
+    if (m_outputNo == -1) {
+
+        //!!! process audio!
+
+    } else {
 	
-    SparseTimeValueModel *model = new SparseTimeValueModel
-        (input->getSampleRate(), m_context.blockSize, 0.0, 0.0, false);
+        SparseTimeValueModel *model = new SparseTimeValueModel
+            (input->getSampleRate(), m_context.blockSize, 0.0, 0.0, false);
 
-    if (units != "") model->setScaleUnits(units);
+        if (units != "") model->setScaleUnits(units);
 
-    m_output = model;
+        m_output = model;
+    }
 }
 
 RealTimePluginTransform::~RealTimePluginTransform()