diff plugin/DSSIPluginInstance.cpp @ 239:71f869dac40b

* Further fixes for Vamp API change, and update to support API versioning * Add plugin, output and parameter descriptions to GUI * Avoid squished panner in heads-up-display on pane when time-value or note layer is on top
author Chris Cannam
date Tue, 27 Feb 2007 12:51:38 +0000
parents c30728d5625c
children 2f7d27648806
line wrap: on
line diff
--- a/plugin/DSSIPluginInstance.cpp	Mon Feb 26 20:08:51 2007 +0000
+++ b/plugin/DSSIPluginInstance.cpp	Tue Feb 27 12:51:38 2007 +0000
@@ -98,15 +98,21 @@
 }
 
 std::string
+DSSIPluginInstance::getIdentifier() const
+{
+    return m_descriptor->LADSPA_Plugin->Label;
+}
+
+std::string
 DSSIPluginInstance::getName() const
 {
-    return m_descriptor->LADSPA_Plugin->Label;
+    return m_descriptor->LADSPA_Plugin->Name;
 }
 
 std::string 
 DSSIPluginInstance::getDescription() const
 {
-    return m_descriptor->LADSPA_Plugin->Name;
+    return "";
 }
 
 std::string
@@ -138,8 +144,9 @@
         ParameterDescriptor pd;
         unsigned int pn = m_controlPortsIn[i].first;
 
-        pd.name = m_descriptor->LADSPA_Plugin->PortNames[pn];
-        pd.description = pd.name;
+        pd.identifier = m_descriptor->LADSPA_Plugin->PortNames[pn];
+        pd.name = pd.identifier;
+        pd.description = "";
         pd.minValue = f->getPortMinimum(m_descriptor->LADSPA_Plugin, pn);
         pd.maxValue = f->getPortMaximum(m_descriptor->LADSPA_Plugin, pn);
         pd.defaultValue = f->getPortDefault(m_descriptor->LADSPA_Plugin, pn);
@@ -159,13 +166,13 @@
 }
 
 float
-DSSIPluginInstance::getParameter(std::string name) const
+DSSIPluginInstance::getParameter(std::string id) const
 {
 #ifdef DEBUG_DSSI
-    std::cerr << "DSSIPluginInstance::getParameter(" << name << ")" << std::endl;
+    std::cerr << "DSSIPluginInstance::getParameter(" << id << ")" << std::endl;
 #endif
     for (unsigned int i = 0; i < m_controlPortsIn.size(); ++i) {
-        if (name == m_descriptor->LADSPA_Plugin->PortNames[m_controlPortsIn[i].first]) {
+        if (id == m_descriptor->LADSPA_Plugin->PortNames[m_controlPortsIn[i].first]) {
 #ifdef DEBUG_DSSI
             std::cerr << "Matches port " << i << std::endl;
 #endif
@@ -181,14 +188,14 @@
 }
 
 void
-DSSIPluginInstance::setParameter(std::string name, float value)
+DSSIPluginInstance::setParameter(std::string id, float value)
 {
 #ifdef DEBUG_DSSI
-    std::cerr << "DSSIPluginInstance::setParameter(" << name << ", " << value << ")" << std::endl;
+    std::cerr << "DSSIPluginInstance::setParameter(" << id << ", " << value << ")" << std::endl;
 #endif
 
     for (unsigned int i = 0; i < m_controlPortsIn.size(); ++i) {
-        if (name == m_descriptor->LADSPA_Plugin->PortNames[m_controlPortsIn[i].first]) {
+        if (id == m_descriptor->LADSPA_Plugin->PortNames[m_controlPortsIn[i].first]) {
             setParameterValue(i, value);
             break;
         }