本文整理汇总了C++中AudioProcessor::getNumParameters方法的典型用法代码示例。如果您正苦于以下问题:C++ AudioProcessor::getNumParameters方法的具体用法?C++ AudioProcessor::getNumParameters怎么用?C++ AudioProcessor::getNumParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AudioProcessor
的用法示例。
在下文中一共展示了AudioProcessor::getNumParameters方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mouseDoubleClick
void PMixInterpolationSpaceLayout::mouseDoubleClick (const MouseEvent& e)
{
if(graphEditor.getLassoSelection().getNumSelected() == 1)
{
NodeComponent* selectedItem = dynamic_cast<NodeComponent*>(graphEditor.getLassoSelection().getSelectedItem(0));
if (selectedItem)
{
AudioProcessor* proc = audioEngine.getDoc().getNodeForId(selectedItem->nodeID)->getProcessor();
bool hasParams = (proc->getNumParameters() > 0);
if (hasParams)
{
if (!InternalPluginFormat::isInternalFormat(proc->getName()))
{
double x = (double) e.getMouseDownX()/getWidth();
double y = (double) e.getMouseDownY()/getHeight();
audioEngine.getDoc().addPreset(selectedItem->nodeID, x, y);
}
}
}
}
}
示例2: update
void update (AudioProcessor& audioProcessor, bool forceLegacyParamIDs)
{
clear();
legacyParamIDs = forceLegacyParamIDs;
auto numParameters = audioProcessor.getNumParameters();
usingManagedParameters = (audioProcessor.getParameters().size() == numParameters) && (! legacyParamIDs);
for (int i = 0; i < numParameters; ++i)
{
AudioProcessorParameter* param = usingManagedParameters ? audioProcessor.getParameters()[i]
: (legacy.add (new LegacyAudioParameter (audioProcessor, i)));
params.add (param);
}
}
示例3: getParamIndex
static int getParamIndex (AudioProcessor& processor, AudioProcessorParameter* param) noexcept
{
if (auto* legacy = dynamic_cast<LegacyAudioParameter*> (param))
{
return legacy->parameterIndex;
}
else
{
auto n = processor.getNumParameters();
jassert (n == processor.getParameters().size());
for (int i = 0; i < n; ++i)
{
if (processor.getParameters()[i] == param)
return i;
}
}
return -1;
}
示例4: mouseDown
void PMixInterpolationSpaceLayout::mouseDown (const MouseEvent& e)
{
selectedItems.deselectAll();
if (e.mods.isPopupMenu())
{
if(graphEditor.getLassoSelection().getNumSelected() == 1)
{
NodeComponent* selectedItem = dynamic_cast<NodeComponent*>(graphEditor.getLassoSelection().getSelectedItem(0));
if (selectedItem)
{
AudioProcessor* proc = audioEngine.getDoc().getNodeForId(selectedItem->nodeID)->getProcessor();
PopupMenu m;
bool hasParams = (proc->getNumParameters() > 0);
m.addItem (1, TRANS("Add preset for node"), hasParams);
const int r = m.show();
if (r == 1)
{
if (!InternalPluginFormat::isInternalFormat(proc->getName()))
{
double x = (double) e.getMouseDownX()/getWidth();
double y = (double) e.getMouseDownY()/getHeight();
audioEngine.getDoc().addPreset(selectedItem->nodeID, x, y);
}
}
}
}
}
else
{
addChildComponent (lassoComp);
lassoComp.beginLasso (e, this);
}
}