comparison transform/RealTimePluginTransform.cpp @ 63:ba405e5e69d3

* Add auto-normalize option to waveform layer * Various fixes to display of dB/metered levels in waveform layer. Still need to fix to ensure they don't waste half the display * Add mix channels option to waveform layer * Use multiple transforms menus, one per transform type -- not sure about this * Give centroid plugin two outputs, for log and linear frequency weightings * Show scale units from plugin in time-value display
author Chris Cannam
date Wed, 29 Mar 2006 12:35:17 +0000
parents 749b5521e082
children 4d59dc469b0f
comparison
equal deleted inserted replaced
62:33285f426852 63:ba405e5e69d3
26 #include <iostream> 26 #include <iostream>
27 27
28 RealTimePluginTransform::RealTimePluginTransform(Model *inputModel, 28 RealTimePluginTransform::RealTimePluginTransform(Model *inputModel,
29 QString pluginId, 29 QString pluginId,
30 QString configurationXml, 30 QString configurationXml,
31 QString units,
31 int output) : 32 int output) :
32 Transform(inputModel), 33 Transform(inputModel),
33 m_plugin(0), 34 m_plugin(0),
34 m_outputNo(output) 35 m_outputNo(output)
35 { 36 {
64 if (m_outputNo >= m_plugin->getControlOutputCount()) { 65 if (m_outputNo >= m_plugin->getControlOutputCount()) {
65 std::cerr << "RealTimePluginTransform: Plugin has fewer than desired " << m_outputNo << " control outputs" << std::endl; 66 std::cerr << "RealTimePluginTransform: Plugin has fewer than desired " << m_outputNo << " control outputs" << std::endl;
66 return; 67 return;
67 } 68 }
68 69
69 m_output = new SparseTimeValueModel(input->getSampleRate(), 70 SparseTimeValueModel *model = new SparseTimeValueModel
70 1024, //!!! 71 (input->getSampleRate(), 1024, //!!!
71 0.0, 0.0, false); 72 0.0, 0.0, false);
73
74 if (units != "") model->setScaleUnits(units);
75
76 m_output = model;
72 } 77 }
73 78
74 RealTimePluginTransform::~RealTimePluginTransform() 79 RealTimePluginTransform::~RealTimePluginTransform()
75 { 80 {
76 delete m_plugin; 81 delete m_plugin;