Mercurial > hg > svcore
comparison transform/RealTimeEffectModelTransformer.cpp @ 849:418cd2064769 tonioni_multi_transform
More on multi-transform stuff
author | Chris Cannam |
---|---|
date | Mon, 02 Dec 2013 11:17:24 +0000 |
parents | e802e550a1f2 |
children | dba8a02b0413 |
comparison
equal
deleted
inserted
replaced
848:539740f231fa | 849:418cd2064769 |
---|---|
84 } | 84 } |
85 | 85 |
86 WritableWaveFileModel *model = new WritableWaveFileModel | 86 WritableWaveFileModel *model = new WritableWaveFileModel |
87 (input->getSampleRate(), outputChannels); | 87 (input->getSampleRate(), outputChannels); |
88 | 88 |
89 m_output = model; | 89 m_outputs.push_back(model); |
90 | 90 |
91 } else { | 91 } else { |
92 | 92 |
93 SparseTimeValueModel *model = new SparseTimeValueModel | 93 SparseTimeValueModel *model = new SparseTimeValueModel |
94 (input->getSampleRate(), m_transform.getBlockSize(), 0.0, 0.0, false); | 94 (input->getSampleRate(), m_transform.getBlockSize(), 0.0, 0.0, false); |
95 | 95 |
96 if (m_units != "") model->setScaleUnits(m_units); | 96 if (m_units != "") model->setScaleUnits(m_units); |
97 | 97 |
98 m_output = model; | 98 m_outputs.push_back(model); |
99 } | 99 } |
100 } | 100 } |
101 | 101 |
102 RealTimeEffectModelTransformer::~RealTimeEffectModelTransformer() | 102 RealTimeEffectModelTransformer::~RealTimeEffectModelTransformer() |
103 { | 103 { |
125 SVDEBUG << "RealTimeEffectModelTransformer::run: Waiting for input model to be ready..." << endl; | 125 SVDEBUG << "RealTimeEffectModelTransformer::run: Waiting for input model to be ready..." << endl; |
126 usleep(500000); | 126 usleep(500000); |
127 } | 127 } |
128 if (m_abandoned) return; | 128 if (m_abandoned) return; |
129 | 129 |
130 SparseTimeValueModel *stvm = dynamic_cast<SparseTimeValueModel *>(m_output); | 130 SparseTimeValueModel *stvm = dynamic_cast<SparseTimeValueModel *>(m_outputs[0]); |
131 WritableWaveFileModel *wwfm = dynamic_cast<WritableWaveFileModel *>(m_output); | 131 WritableWaveFileModel *wwfm = dynamic_cast<WritableWaveFileModel *>(m_outputs[0]); |
132 if (!stvm && !wwfm) return; | 132 if (!stvm && !wwfm) return; |
133 | 133 |
134 if (stvm && (m_outputNo >= int(m_plugin->getControlOutputCount()))) return; | 134 if (stvm && (m_outputNo >= int(m_plugin->getControlOutputCount()))) return; |
135 | 135 |
136 size_t sampleRate = input->getSampleRate(); | 136 size_t sampleRate = input->getSampleRate(); |