comparison 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
comparison
equal deleted inserted replaced
238:76635085e2d9 239:71f869dac40b
96 initialiseGroupMembership(); 96 initialiseGroupMembership();
97 } 97 }
98 } 98 }
99 99
100 std::string 100 std::string
101 DSSIPluginInstance::getIdentifier() const
102 {
103 return m_descriptor->LADSPA_Plugin->Label;
104 }
105
106 std::string
101 DSSIPluginInstance::getName() const 107 DSSIPluginInstance::getName() const
102 { 108 {
103 return m_descriptor->LADSPA_Plugin->Label; 109 return m_descriptor->LADSPA_Plugin->Name;
104 } 110 }
105 111
106 std::string 112 std::string
107 DSSIPluginInstance::getDescription() const 113 DSSIPluginInstance::getDescription() const
108 { 114 {
109 return m_descriptor->LADSPA_Plugin->Name; 115 return "";
110 } 116 }
111 117
112 std::string 118 std::string
113 DSSIPluginInstance::getMaker() const 119 DSSIPluginInstance::getMaker() const
114 { 120 {
136 for (unsigned int i = 0; i < m_controlPortsIn.size(); ++i) { 142 for (unsigned int i = 0; i < m_controlPortsIn.size(); ++i) {
137 143
138 ParameterDescriptor pd; 144 ParameterDescriptor pd;
139 unsigned int pn = m_controlPortsIn[i].first; 145 unsigned int pn = m_controlPortsIn[i].first;
140 146
141 pd.name = m_descriptor->LADSPA_Plugin->PortNames[pn]; 147 pd.identifier = m_descriptor->LADSPA_Plugin->PortNames[pn];
142 pd.description = pd.name; 148 pd.name = pd.identifier;
149 pd.description = "";
143 pd.minValue = f->getPortMinimum(m_descriptor->LADSPA_Plugin, pn); 150 pd.minValue = f->getPortMinimum(m_descriptor->LADSPA_Plugin, pn);
144 pd.maxValue = f->getPortMaximum(m_descriptor->LADSPA_Plugin, pn); 151 pd.maxValue = f->getPortMaximum(m_descriptor->LADSPA_Plugin, pn);
145 pd.defaultValue = f->getPortDefault(m_descriptor->LADSPA_Plugin, pn); 152 pd.defaultValue = f->getPortDefault(m_descriptor->LADSPA_Plugin, pn);
146 153
147 float q = f->getPortQuantization(m_descriptor->LADSPA_Plugin, pn); 154 float q = f->getPortQuantization(m_descriptor->LADSPA_Plugin, pn);
157 164
158 return list; 165 return list;
159 } 166 }
160 167
161 float 168 float
162 DSSIPluginInstance::getParameter(std::string name) const 169 DSSIPluginInstance::getParameter(std::string id) const
163 { 170 {
164 #ifdef DEBUG_DSSI 171 #ifdef DEBUG_DSSI
165 std::cerr << "DSSIPluginInstance::getParameter(" << name << ")" << std::endl; 172 std::cerr << "DSSIPluginInstance::getParameter(" << id << ")" << std::endl;
166 #endif 173 #endif
167 for (unsigned int i = 0; i < m_controlPortsIn.size(); ++i) { 174 for (unsigned int i = 0; i < m_controlPortsIn.size(); ++i) {
168 if (name == m_descriptor->LADSPA_Plugin->PortNames[m_controlPortsIn[i].first]) { 175 if (id == m_descriptor->LADSPA_Plugin->PortNames[m_controlPortsIn[i].first]) {
169 #ifdef DEBUG_DSSI 176 #ifdef DEBUG_DSSI
170 std::cerr << "Matches port " << i << std::endl; 177 std::cerr << "Matches port " << i << std::endl;
171 #endif 178 #endif
172 float v = getParameterValue(i); 179 float v = getParameterValue(i);
173 #ifdef DEBUG_DSSI 180 #ifdef DEBUG_DSSI
179 186
180 return 0.0; 187 return 0.0;
181 } 188 }
182 189
183 void 190 void
184 DSSIPluginInstance::setParameter(std::string name, float value) 191 DSSIPluginInstance::setParameter(std::string id, float value)
185 { 192 {
186 #ifdef DEBUG_DSSI 193 #ifdef DEBUG_DSSI
187 std::cerr << "DSSIPluginInstance::setParameter(" << name << ", " << value << ")" << std::endl; 194 std::cerr << "DSSIPluginInstance::setParameter(" << id << ", " << value << ")" << std::endl;
188 #endif 195 #endif
189 196
190 for (unsigned int i = 0; i < m_controlPortsIn.size(); ++i) { 197 for (unsigned int i = 0; i < m_controlPortsIn.size(); ++i) {
191 if (name == m_descriptor->LADSPA_Plugin->PortNames[m_controlPortsIn[i].first]) { 198 if (id == m_descriptor->LADSPA_Plugin->PortNames[m_controlPortsIn[i].first]) {
192 setParameterValue(i, value); 199 setParameterValue(i, value);
193 break; 200 break;
194 } 201 }
195 } 202 }
196 } 203 }