mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
ARA Host: Add support for scanning and hosting ARA plugins
This commit is contained in:
parent
d99fbccb66
commit
f36949c1b2
31 changed files with 3522 additions and 133 deletions
|
|
@ -391,6 +391,14 @@ struct GraphEditorPanel::PluginComponent : public Component,
|
|||
return {};
|
||||
}
|
||||
|
||||
bool isNodeUsingARA() const
|
||||
{
|
||||
if (auto node = graph.graph.getNodeForId (pluginID))
|
||||
return node->properties["useARA"];
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void showPopupMenu()
|
||||
{
|
||||
menu.reset (new PopupMenu);
|
||||
|
|
@ -412,6 +420,12 @@ struct GraphEditorPanel::PluginComponent : public Component,
|
|||
menu->addItem ("Show all parameters", [this] { showWindow (PluginWindow::Type::generic); });
|
||||
menu->addItem ("Show debug log", [this] { showWindow (PluginWindow::Type::debug); });
|
||||
|
||||
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS)
|
||||
if (auto* instance = dynamic_cast<AudioPluginInstance*> (getProcessor()))
|
||||
if (instance->getPluginDescription().hasARAExtension && isNodeUsingARA())
|
||||
menu->addItem ("Show ARA host controls", [this] { showWindow (PluginWindow::Type::araHost); });
|
||||
#endif
|
||||
|
||||
if (autoScaleOptionAvailable)
|
||||
addPluginAutoScaleOptionsSubMenu (dynamic_cast<AudioPluginInstance*> (getProcessor()), *menu);
|
||||
|
||||
|
|
@ -777,7 +791,7 @@ void GraphEditorPanel::mouseDrag (const MouseEvent& e)
|
|||
stopTimer();
|
||||
}
|
||||
|
||||
void GraphEditorPanel::createNewPlugin (const PluginDescription& desc, Point<int> position)
|
||||
void GraphEditorPanel::createNewPlugin (const PluginDescriptionAndPreference& desc, Point<int> position)
|
||||
{
|
||||
graph.addPlugin (desc, position.toDouble() / Point<double> ((double) getWidth(), (double) getHeight()));
|
||||
}
|
||||
|
|
@ -1273,7 +1287,7 @@ void GraphDocumentComponent::resized()
|
|||
checkAvailableWidth();
|
||||
}
|
||||
|
||||
void GraphDocumentComponent::createNewPlugin (const PluginDescription& desc, Point<int> pos)
|
||||
void GraphDocumentComponent::createNewPlugin (const PluginDescriptionAndPreference& desc, Point<int> pos)
|
||||
{
|
||||
graphPanel->createNewPlugin (desc, pos);
|
||||
}
|
||||
|
|
@ -1320,7 +1334,8 @@ void GraphDocumentComponent::itemDropped (const SourceDetails& details)
|
|||
// must be a valid index!
|
||||
jassert (isPositiveAndBelow (pluginTypeIndex, pluginList.getNumTypes()));
|
||||
|
||||
createNewPlugin (pluginList.getTypes()[pluginTypeIndex], details.localPosition);
|
||||
createNewPlugin (PluginDescriptionAndPreference { pluginList.getTypes()[pluginTypeIndex] },
|
||||
details.localPosition);
|
||||
}
|
||||
|
||||
void GraphDocumentComponent::showSidePanel (bool showSettingsPanel)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue