本文整理汇总了C++中AudioPluginInstance::fillInPluginDescription方法的典型用法代码示例。如果您正苦于以下问题:C++ AudioPluginInstance::fillInPluginDescription方法的具体用法?C++ AudioPluginInstance::fillInPluginDescription怎么用?C++ AudioPluginInstance::fillInPluginDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AudioPluginInstance
的用法示例。
在下文中一共展示了AudioPluginInstance::fillInPluginDescription方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: formatFilterModel
FilterModel FilterGraph::formatFilterModel (AudioProcessorGraph::Node* const node)
{
//FOR SAVING AND UPDATING
FilterModel filter;
AudioPluginInstance* plugin = dynamic_cast<AudioPluginInstance*>(node->getProcessor());
if (plugin == nullptr) {
jassertfalse;
return filter;
}
PluginDescription pd;
plugin->fillInPluginDescription(pd);
fill_in_filter_pd_info(node, filter, pd);
return filter;
}
示例2: createNodeXml
XmlElement* PMixDocument::createNodeXml (AudioProcessorGraph::Node* const node) noexcept
{
AudioPluginInstance* plugin = dynamic_cast <AudioPluginInstance*> (node->getProcessor());
if (plugin == nullptr)
{
jassertfalse;
return nullptr;
}
XmlElement* e = new XmlElement ("NODE");
e->setAttribute ("uid", (int) node->nodeID);
e->setAttribute ("x", node->properties ["x"].toString());
e->setAttribute ("y", node->properties ["y"].toString());
e->setAttribute ("uiLastX", node->properties ["uiLastX"].toString());
e->setAttribute ("uiLastY", node->properties ["uiLastY"].toString());
e->setAttribute ("uiStatus", node->properties ["uiStatus"].toString());
PluginDescription pd;
plugin->fillInPluginDescription (pd);
if(!InternalPluginFormat::isInternalFormat(pd.name))
{
e->setAttribute("colour", node->properties ["colour"].toString());
e->setAttribute ("iposx", node->properties ["iposx"].toString());
e->setAttribute ("iposy", node->properties ["iposy"].toString());
}
e->addChildElement (pd.createXml());
XmlElement* state = new XmlElement ("STATE");
MemoryBlock m;
node->getProcessor()->getStateInformation (m);
state->addTextElement (m.toBase64Encoding());
e->addChildElement (state);
if(!InternalPluginFormat::isInternalFormat(pd.name))
{
XmlElement* params = new XmlElement ("PARAMS");
Array<var>* paramsArray = node->properties.getVarPointer("params")->getArray();
params->addTextElement("[");
for(int i=0;i<paramsArray->size();i++)
{
var parameterIdx = paramsArray->getReference(i);
params->addTextElement(parameterIdx.toString());
if(i != paramsArray->size()-1)
params->addTextElement(", ");
}
params->addTextElement("]");
e->addChildElement(params);
Array<var>* presetsArr = node->properties.getVarPointer("presets")->getArray();
for(int i=0;i<presetsArr->size();i++)
{
XmlElement* presetXML = new XmlElement ("PRESET");
DynamicObject* thePreset = presetsArr->getReference(i).getDynamicObject();
presetXML->setAttribute("name", thePreset->getProperty("name").toString());
presetXML->setAttribute("x", thePreset->getProperty("x").toString());
presetXML->setAttribute("y", thePreset->getProperty("y").toString());
presetXML->setAttribute("radius", thePreset->getProperty("radius").toString());
presetXML->setAttribute("hidden", thePreset->getProperty("hidden").toString());
//presetXML->setAttribute("distance", thePreset->getProperty("distance").toString());
presetXML->setAttribute("coeff", thePreset->getProperty("coeff").toString());
presetXML->setAttribute("uid", thePreset->getProperty("uid").toString());
Array<var>* paramsArray = thePreset->getProperty("state").getArray();
presetXML->addTextElement("[");
for(int i=0;i<paramsArray->size();i++)
{
var parameterIdx = paramsArray->getReference(i);
presetXML->addTextElement(parameterIdx.toString());
if(i != paramsArray->size()-1)
presetXML->addTextElement(", ");
}
presetXML->addTextElement("]");
e->addChildElement(presetXML);
}
}
return e;
}