Mercurial > hg > svgui
diff widgets/PluginParameterBox.cpp @ 71:72fa239a4880
* 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 | 10bcd53ddc71 |
children | 195ad6178ef8 |
line wrap: on
line diff
--- a/widgets/PluginParameterBox.cpp Thu Mar 30 15:00:22 2006 +0000 +++ b/widgets/PluginParameterBox.cpp Fri Mar 31 15:56:35 2006 +0000 @@ -17,6 +17,8 @@ #include "AudioDial.h" +#include "plugin/PluginXml.h" + #include <QDoubleSpinBox> #include <QGridLayout> #include <QComboBox> @@ -27,7 +29,7 @@ #include <iostream> #include <string> -PluginParameterBox::PluginParameterBox(PluginInstance *plugin, QWidget *parent) : +PluginParameterBox::PluginParameterBox(Vamp::PluginBase *plugin, QWidget *parent) : QFrame(parent), m_plugin(plugin) { @@ -43,8 +45,8 @@ void PluginParameterBox::populate() { - PluginInstance::ParameterList params = m_plugin->getParameterDescriptors(); - PluginInstance::ProgramList programs = m_plugin->getPrograms(); + Vamp::PluginBase::ParameterList params = m_plugin->getParameterDescriptors(); + Vamp::PluginBase::ProgramList programs = m_plugin->getPrograms(); m_params.clear(); @@ -170,7 +172,7 @@ return; } - PluginInstance::ParameterDescriptor params = m_params[name].param; + Vamp::PluginBase::ParameterDescriptor params = m_params[name].param; float min = params.minValue; float max = params.maxValue; @@ -193,7 +195,7 @@ m_plugin->setParameter(name.toStdString(), newValue); - emit pluginConfigurationChanged(m_plugin->toXmlString()); + emit pluginConfigurationChanged(PluginXml(m_plugin).toXmlString()); } void @@ -207,12 +209,12 @@ return; } - PluginInstance::ParameterDescriptor params = m_params[name].param; + Vamp::PluginBase::ParameterDescriptor params = m_params[name].param; if (state) m_plugin->setParameter(name.toStdString(), 1.0); else m_plugin->setParameter(name.toStdString(), 0.0); - emit pluginConfigurationChanged(m_plugin->toXmlString()); + emit pluginConfigurationChanged(PluginXml(m_plugin).toXmlString()); } void @@ -226,7 +228,7 @@ return; } - PluginInstance::ParameterDescriptor params = m_params[name].param; + Vamp::PluginBase::ParameterDescriptor params = m_params[name].param; float min = params.minValue; float max = params.maxValue; @@ -258,7 +260,7 @@ m_plugin->setParameter(name.toStdString(), value); - emit pluginConfigurationChanged(m_plugin->toXmlString()); + emit pluginConfigurationChanged(PluginXml(m_plugin).toXmlString()); } void @@ -269,7 +271,7 @@ for (std::map<QString, ParamRec>::iterator i = m_params.begin(); i != m_params.end(); ++i) { - PluginInstance::ParameterDescriptor ¶m = i->second.param; + Vamp::PluginBase::ParameterDescriptor ¶m = i->second.param; float value = m_plugin->getParameter(param.name); if (i->second.spin) { @@ -296,6 +298,6 @@ } } - emit pluginConfigurationChanged(m_plugin->toXmlString()); + emit pluginConfigurationChanged(PluginXml(m_plugin).toXmlString()); }