Mercurial > hg > vamp-plugin-sdk
diff 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 |
line wrap: on
line diff
--- a/vamp-sdk/PluginHostAdapter.cpp Mon Apr 03 14:19:02 2006 +0000 +++ b/vamp-sdk/PluginHostAdapter.cpp Wed Apr 05 16:50:07 2006 +0000 @@ -125,6 +125,11 @@ pd.defaultValue = spd->defaultValue; pd.isQuantized = spd->isQuantized; pd.quantizeStep = spd->quantizeStep; + if (pd.isQuantized && spd->valueNames) { + for (unsigned int j = 0; spd->valueNames[j]; ++j) { + pd.valueNames.push_back(spd->valueNames[j]); + } + } list.push_back(pd); } return list; @@ -220,10 +225,12 @@ d.name = sd->name; d.description = sd->description; d.unit = sd->unit; - d.hasFixedValueCount = sd->hasFixedValueCount; - d.valueCount = sd->valueCount; - for (unsigned int j = 0; j < sd->valueCount; ++j) { - d.valueNames.push_back(sd->valueNames[j] ? sd->valueNames[j] : ""); + d.hasFixedBinCount = sd->hasFixedBinCount; + d.binCount = sd->binCount; + if (d.hasFixedBinCount) { + for (unsigned int j = 0; j < sd->binCount; ++j) { + d.binNames.push_back(sd->binNames[j] ? sd->binNames[j] : ""); + } } d.hasKnownExtents = sd->hasKnownExtents; d.minValue = sd->minValue;