Mercurial > hg > svcore
comparison transform/RealTimePluginTransform.cpp @ 66:7afcfe666910
* Modify to use Vamp SDK for proper feature extraction plugins.
  Requires that the vamp-plugin-sdk directory tree be present below
  plugin/ (it's separate in Subversion).
| author | Chris Cannam | 
|---|---|
| date | Fri, 31 Mar 2006 15:56:35 +0000 | 
| parents | 4d59dc469b0f | 
| children | 47fd14e29813 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 65:e1aad27029e3 | 66:7afcfe666910 | 
|---|---|
| 16 | 16 | 
| 17 #include "RealTimePluginTransform.h" | 17 #include "RealTimePluginTransform.h" | 
| 18 | 18 | 
| 19 #include "plugin/RealTimePluginFactory.h" | 19 #include "plugin/RealTimePluginFactory.h" | 
| 20 #include "plugin/RealTimePluginInstance.h" | 20 #include "plugin/RealTimePluginInstance.h" | 
| 21 #include "plugin/PluginXml.h" | |
| 21 | 22 | 
| 22 #include "base/Model.h" | 23 #include "base/Model.h" | 
| 23 #include "model/SparseTimeValueModel.h" | 24 #include "model/SparseTimeValueModel.h" | 
| 24 #include "model/DenseTimeValueModel.h" | 25 #include "model/DenseTimeValueModel.h" | 
| 25 | 26 | 
| 59 << pluginId.toStdString() << "\"" << std::endl; | 60 << pluginId.toStdString() << "\"" << std::endl; | 
| 60 return; | 61 return; | 
| 61 } | 62 } | 
| 62 | 63 | 
| 63 if (configurationXml != "") { | 64 if (configurationXml != "") { | 
| 64 m_plugin->setParametersFromXml(configurationXml); | 65 PluginXml(m_plugin).setParametersFromXml(configurationXml); | 
| 65 } | 66 } | 
| 66 | 67 | 
| 67 if (m_outputNo >= m_plugin->getControlOutputCount()) { | 68 if (m_outputNo >= m_plugin->getControlOutputCount()) { | 
| 68 std::cerr << "RealTimePluginTransform: Plugin has fewer than desired " << m_outputNo << " control outputs" << std::endl; | 69 std::cerr << "RealTimePluginTransform: Plugin has fewer than desired " << m_outputNo << " control outputs" << std::endl; | 
| 69 return; | 70 return; | 
| 143 buffers[ch][got++] = 0.0; | 144 buffers[ch][got++] = 0.0; | 
| 144 } | 145 } | 
| 145 } | 146 } | 
| 146 } | 147 } | 
| 147 | 148 | 
| 148 m_plugin->run(RealTime::frame2RealTime(blockFrame, sampleRate)); | 149 m_plugin->run(Vamp::RealTime::frame2RealTime(blockFrame, sampleRate)); | 
| 149 | 150 | 
| 150 float value = m_plugin->getControlOutputValue(m_outputNo); | 151 float value = m_plugin->getControlOutputValue(m_outputNo); | 
| 151 | 152 | 
| 152 model->addPoint(SparseTimeValueModel::Point | 153 model->addPoint(SparseTimeValueModel::Point | 
| 153 (blockFrame - m_plugin->getLatency(), value, "")); | 154 (blockFrame - m_plugin->getLatency(), value, "")); | 
