Mercurial > hg > vamp-plugin-sdk
comparison vamp-sdk/PluginHostAdapter.cpp @ 49:aa64a46320d4
* Rename "name" and "description" to "identifier" and "name"; add new
"description" that actually contains a description
author | cannam |
---|---|
date | Mon, 26 Feb 2007 18:08:48 +0000 |
parents | be8fdfe25693 |
children | b907557b2fb9 |
comparison
equal
deleted
inserted
replaced
48:f46bf5e0fa42 | 49:aa64a46320d4 |
---|---|
139 return TimeDomain; | 139 return TimeDomain; |
140 } | 140 } |
141 } | 141 } |
142 | 142 |
143 std::string | 143 std::string |
144 PluginHostAdapter::getIdentifier() const | |
145 { | |
146 return m_descriptor->identifier; | |
147 } | |
148 | |
149 std::string | |
144 PluginHostAdapter::getName() const | 150 PluginHostAdapter::getName() const |
145 { | 151 { |
146 return m_descriptor->name; | 152 return m_descriptor->name; |
147 } | 153 } |
148 | 154 |
175 { | 181 { |
176 ParameterList list; | 182 ParameterList list; |
177 for (unsigned int i = 0; i < m_descriptor->parameterCount; ++i) { | 183 for (unsigned int i = 0; i < m_descriptor->parameterCount; ++i) { |
178 const VampParameterDescriptor *spd = m_descriptor->parameters[i]; | 184 const VampParameterDescriptor *spd = m_descriptor->parameters[i]; |
179 ParameterDescriptor pd; | 185 ParameterDescriptor pd; |
186 pd.identifier = spd->identifier; | |
180 pd.name = spd->name; | 187 pd.name = spd->name; |
181 pd.description = spd->description; | 188 pd.description = spd->description; |
182 pd.unit = spd->unit; | 189 pd.unit = spd->unit; |
183 pd.minValue = spd->minValue; | 190 pd.minValue = spd->minValue; |
184 pd.maxValue = spd->maxValue; | 191 pd.maxValue = spd->maxValue; |
199 PluginHostAdapter::getParameter(std::string param) const | 206 PluginHostAdapter::getParameter(std::string param) const |
200 { | 207 { |
201 if (!m_handle) return 0.0; | 208 if (!m_handle) return 0.0; |
202 | 209 |
203 for (unsigned int i = 0; i < m_descriptor->parameterCount; ++i) { | 210 for (unsigned int i = 0; i < m_descriptor->parameterCount; ++i) { |
204 if (param == m_descriptor->parameters[i]->name) { | 211 if (param == m_descriptor->parameters[i]->identifier) { |
205 return m_descriptor->getParameter(m_handle, i); | 212 return m_descriptor->getParameter(m_handle, i); |
206 } | 213 } |
207 } | 214 } |
208 | 215 |
209 return 0.0; | 216 return 0.0; |
214 float value) | 221 float value) |
215 { | 222 { |
216 if (!m_handle) return; | 223 if (!m_handle) return; |
217 | 224 |
218 for (unsigned int i = 0; i < m_descriptor->parameterCount; ++i) { | 225 for (unsigned int i = 0; i < m_descriptor->parameterCount; ++i) { |
219 if (param == m_descriptor->parameters[i]->name) { | 226 if (param == m_descriptor->parameters[i]->identifier) { |
220 m_descriptor->setParameter(m_handle, i, value); | 227 m_descriptor->setParameter(m_handle, i, value); |
221 return; | 228 return; |
222 } | 229 } |
223 } | 230 } |
224 } | 231 } |
297 unsigned int count = m_descriptor->getOutputCount(m_handle); | 304 unsigned int count = m_descriptor->getOutputCount(m_handle); |
298 | 305 |
299 for (unsigned int i = 0; i < count; ++i) { | 306 for (unsigned int i = 0; i < count; ++i) { |
300 VampOutputDescriptor *sd = m_descriptor->getOutputDescriptor(m_handle, i); | 307 VampOutputDescriptor *sd = m_descriptor->getOutputDescriptor(m_handle, i); |
301 OutputDescriptor d; | 308 OutputDescriptor d; |
309 d.identifier = sd->identifier; | |
302 d.name = sd->name; | 310 d.name = sd->name; |
303 d.description = sd->description; | 311 d.description = sd->description; |
304 d.unit = sd->unit; | 312 d.unit = sd->unit; |
305 d.hasFixedBinCount = sd->hasFixedBinCount; | 313 d.hasFixedBinCount = sd->hasFixedBinCount; |
306 d.binCount = sd->binCount; | 314 d.binCount = sd->binCount; |