Mercurial > hg > vamp-plugin-sdk
comparison vamp-sdk/PluginHostAdapter.cpp @ 9:44113b1e296b
* Add valueNames to parameter descriptor
* Change valueCount and valueNames to binCount and binNames in output
descriptor, to avoid confusion with other uses of value
* Some explanatory notes about FFT alignment
author | cannam |
---|---|
date | Wed, 05 Apr 2006 16:50:07 +0000 |
parents | c66551966b5f |
children | a3d35e11c3fe |
comparison
equal
deleted
inserted
replaced
8:c4662bbef275 | 9:44113b1e296b |
---|---|
123 pd.minValue = spd->minValue; | 123 pd.minValue = spd->minValue; |
124 pd.maxValue = spd->maxValue; | 124 pd.maxValue = spd->maxValue; |
125 pd.defaultValue = spd->defaultValue; | 125 pd.defaultValue = spd->defaultValue; |
126 pd.isQuantized = spd->isQuantized; | 126 pd.isQuantized = spd->isQuantized; |
127 pd.quantizeStep = spd->quantizeStep; | 127 pd.quantizeStep = spd->quantizeStep; |
128 if (pd.isQuantized && spd->valueNames) { | |
129 for (unsigned int j = 0; spd->valueNames[j]; ++j) { | |
130 pd.valueNames.push_back(spd->valueNames[j]); | |
131 } | |
132 } | |
128 list.push_back(pd); | 133 list.push_back(pd); |
129 } | 134 } |
130 return list; | 135 return list; |
131 } | 136 } |
132 | 137 |
218 VampOutputDescriptor *sd = m_descriptor->getOutputDescriptor(m_handle, i); | 223 VampOutputDescriptor *sd = m_descriptor->getOutputDescriptor(m_handle, i); |
219 OutputDescriptor d; | 224 OutputDescriptor d; |
220 d.name = sd->name; | 225 d.name = sd->name; |
221 d.description = sd->description; | 226 d.description = sd->description; |
222 d.unit = sd->unit; | 227 d.unit = sd->unit; |
223 d.hasFixedValueCount = sd->hasFixedValueCount; | 228 d.hasFixedBinCount = sd->hasFixedBinCount; |
224 d.valueCount = sd->valueCount; | 229 d.binCount = sd->binCount; |
225 for (unsigned int j = 0; j < sd->valueCount; ++j) { | 230 if (d.hasFixedBinCount) { |
226 d.valueNames.push_back(sd->valueNames[j] ? sd->valueNames[j] : ""); | 231 for (unsigned int j = 0; j < sd->binCount; ++j) { |
232 d.binNames.push_back(sd->binNames[j] ? sd->binNames[j] : ""); | |
233 } | |
227 } | 234 } |
228 d.hasKnownExtents = sd->hasKnownExtents; | 235 d.hasKnownExtents = sd->hasKnownExtents; |
229 d.minValue = sd->minValue; | 236 d.minValue = sd->minValue; |
230 d.maxValue = sd->maxValue; | 237 d.maxValue = sd->maxValue; |
231 d.isQuantized = sd->isQuantized; | 238 d.isQuantized = sd->isQuantized; |