Logo Search packages:      
Sourcecode: vamp-plugin-sdk version File versions  Download package

PluginHostAdapter::ParameterList Vamp::PluginHostAdapter::getParameterDescriptors (  )  const [virtual]

Get the controllable parameters of this plugin.

Reimplemented from Vamp::PluginBase.

Definition at line 186 of file PluginHostAdapter.cpp.

References _VampParameterDescriptor::defaultValue, _VampParameterDescriptor::description, _VampParameterDescriptor::identifier, _VampParameterDescriptor::isQuantized, _VampParameterDescriptor::maxValue, _VampParameterDescriptor::minValue, _VampParameterDescriptor::name, _VampParameterDescriptor::quantizeStep, _VampParameterDescriptor::unit, and _VampParameterDescriptor::valueNames.

{
    ParameterList list;
    for (unsigned int i = 0; i < m_descriptor->parameterCount; ++i) {
        const VampParameterDescriptor *spd = m_descriptor->parameters[i];
        ParameterDescriptor pd;
        pd.identifier = spd->identifier;
        pd.name = spd->name;
        pd.description = spd->description;
        pd.unit = spd->unit;
        pd.minValue = spd->minValue;
        pd.maxValue = spd->maxValue;
        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;
}


Generated by  Doxygen 1.6.0   Back to index