diff transform/RealTimePluginTransform.cpp @ 26:d88d117e0c34

* Add mono timestretch toggle button; some more work on getting blocksize etc parameters through to plugins
author Chris Cannam
date Mon, 18 Sep 2006 16:43:17 +0000
parents 40116f709d3b
children 61259228d029
line wrap: on
line diff
--- a/transform/RealTimePluginTransform.cpp	Fri Sep 15 15:35:06 2006 +0000
+++ b/transform/RealTimePluginTransform.cpp	Mon Sep 18 16:43:17 2006 +0000
@@ -31,12 +31,16 @@
                                                  int channel,
                                                  QString configurationXml,
                                                  QString units,
-                                                 int output) :
+                                                 int output,
+                                                 size_t blockSize) :
     Transform(inputModel),
     m_plugin(0),
     m_channel(channel),
-    m_outputNo(output)
+    m_outputNo(output),
+    m_blockSize(blockSize)
 {
+    if (!m_blockSize) m_blockSize = 1024;
+
     std::cerr << "RealTimePluginTransform::RealTimePluginTransform: plugin " << pluginId.toStdString() << ", output " << output << std::endl;
 
     RealTimePluginFactory *factory =
@@ -52,7 +56,7 @@
     if (!input) return;
 
     m_plugin = factory->instantiatePlugin(pluginId, 0, 0, m_input->getSampleRate(),
-                                          1024, //!!! wants to be configurable
+                                          m_blockSize,
                                           input->getChannelCount());
 
     if (!m_plugin) {
@@ -71,8 +75,7 @@
     }
 	
     SparseTimeValueModel *model = new SparseTimeValueModel
-        (input->getSampleRate(), 1024, //!!!
-         0.0, 0.0, false);
+        (input->getSampleRate(), m_blockSize, 0.0, 0.0, false);
 
     if (units != "") model->setScaleUnits(units);