comparison 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
comparison
equal deleted inserted replaced
33:544ab25d2372 34:8ad306d8a568
64 64
65 if (configurationXml != "") { 65 if (configurationXml != "") {
66 PluginXml(m_plugin).setParametersFromXml(configurationXml); 66 PluginXml(m_plugin).setParametersFromXml(configurationXml);
67 } 67 }
68 68
69 if (m_outputNo >= m_plugin->getControlOutputCount()) { 69 if (m_outputNo >= 0 && m_outputNo >= m_plugin->getControlOutputCount()) {
70 std::cerr << "RealTimePluginTransform: Plugin has fewer than desired " << m_outputNo << " control outputs" << std::endl; 70 std::cerr << "RealTimePluginTransform: Plugin has fewer than desired " << m_outputNo << " control outputs" << std::endl;
71 return; 71 return;
72 } 72 }
73
74 if (m_outputNo == -1) {
75
76 //!!! process audio!
77
78 } else {
73 79
74 SparseTimeValueModel *model = new SparseTimeValueModel 80 SparseTimeValueModel *model = new SparseTimeValueModel
75 (input->getSampleRate(), m_context.blockSize, 0.0, 0.0, false); 81 (input->getSampleRate(), m_context.blockSize, 0.0, 0.0, false);
76 82
77 if (units != "") model->setScaleUnits(units); 83 if (units != "") model->setScaleUnits(units);
78 84
79 m_output = model; 85 m_output = model;
86 }
80 } 87 }
81 88
82 RealTimePluginTransform::~RealTimePluginTransform() 89 RealTimePluginTransform::~RealTimePluginTransform()
83 { 90 {
84 delete m_plugin; 91 delete m_plugin;