1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Linux: Enable ARA compilation

This commit is contained in:
attila 2022-07-28 11:08:40 +02:00 committed by Attila Szarvas
parent 53619b927c
commit 82a31c9ccc
15 changed files with 28 additions and 18 deletions

View file

@ -42,7 +42,9 @@ function(_juce_add_pips)
endif()
if(NOT (TARGET juce_ara_sdk
AND (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")))
AND (CMAKE_SYSTEM_NAME STREQUAL "Windows"
OR CMAKE_SYSTEM_NAME STREQUAL "Darwin"
OR CMAKE_SYSTEM_NAME STREQUAL "Linux")))
list(REMOVE_ITEM headers
"${CMAKE_CURRENT_SOURCE_DIR}/ARAPluginDemo.h")
endif()

View file

@ -25,7 +25,7 @@
#include "ARAPlugin.h"
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS)
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
const Identifier ARAPluginInstanceWrapper::ARATestHost::Context::xmlRootTag { "ARATestHostContext" };
const Identifier ARAPluginInstanceWrapper::ARATestHost::Context::xmlAudioFileAttrib { "AudioFile" };

View file

@ -27,7 +27,7 @@
#include <juce_core/system/juce_TargetPlatform.h>
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS)
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
#include <JuceHeader.h>
@ -179,7 +179,7 @@ class PlaybackRegion
properties.transformationFlags = ARA::kARAPlaybackTransformationNoChanges;
properties.startInModificationTime = 0.0;
const auto& formatReader = audioSource.getFormatReader();
properties.durationInModificationTime = formatReader.lengthInSamples / formatReader.sampleRate;
properties.durationInModificationTime = (double) formatReader.lengthInSamples / formatReader.sampleRate;
properties.startInPlaybackTime = 0.0;
properties.durationInPlaybackTime = properties.durationInModificationTime;
properties.musicalContextRef = sequence.getMusicalContext().getPluginRef();

View file

@ -106,7 +106,7 @@ void PluginGraph::addPluginCallback (std::unique_ptr<AudioPluginInstance> instan
}
else
{
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS)
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
if (useARA == PluginDescriptionAndPreference::UseARA::yes
&& instance->getPluginDescription().hasARAExtension)
{
@ -410,7 +410,7 @@ void PluginGraph::createNodeFromXml (const XmlElement& xml)
graph.getBlockSize(),
errorMessage);
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS)
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
if (instance
&& description.useARA == PluginDescriptionAndPreference::UseARA::yes
&& description.pluginDescription.hasARAExtension)

View file

@ -427,7 +427,7 @@ 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 JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
if (auto* instance = dynamic_cast<AudioPluginInstance*> (getProcessor()))
if (instance->getPluginDescription().hasARAExtension && isNodeUsingARA())
menu->addItem ("Show ARA host controls", [this] { showWindow (PluginWindow::Type::araHost); });

View file

@ -662,7 +662,7 @@ static void addToMenu (const KnownPluginList::PluginTree& tree,
addPlugin (PluginDescriptionAndPreference { plugin, PluginDescriptionAndPreference::UseARA::no }, name);
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS)
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
if (plugin.hasARAExtension)
{
name << " (ARA)";

View file

@ -245,7 +245,7 @@ private:
if (type == PluginWindow::Type::araHost)
{
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS)
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
if (auto* araPluginInstanceWrapper = dynamic_cast<ARAPluginInstanceWrapper*> (&processor))
if (auto* ui = araPluginInstanceWrapper->createARAHostEditor())
return ui;

View file

@ -1910,7 +1910,8 @@ function(juce_add_pip header)
juce_add_plugin(${JUCE_PIP_NAME}
FORMATS AU VST3
IS_ARA_EFFECT TRUE)
IS_ARA_EFFECT TRUE
${extra_target_args})
else()
set(source_main "${JUCE_CMAKE_UTILS_DIR}/PIPAudioProcessor.cpp.in")

View file

@ -499,6 +499,9 @@ public:
{
vstLegacyPathValueWrapper.init ({ settings, Ids::vstLegacyFolder, nullptr },
getAppSettings().getStoredPath (Ids::vstLegacyPath, TargetOS::linux), TargetOS::linux);
araPathValueWrapper.init ({ settings, Ids::araFolder, nullptr },
getAppSettings().getStoredPath (Ids::araPath, TargetOS::linux), TargetOS::linux);
}
//==============================================================================

View file

@ -23,7 +23,7 @@
==============================================================================
*/
#if (JUCE_PLUGINHOST_ARA && (JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_AU) && (JUCE_MAC || JUCE_WINDOWS))
#if (JUCE_PLUGINHOST_ARA && (JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_AU) && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX))
#include <ARA_Library/Debug/ARADebug.h>

View file

@ -75,6 +75,8 @@ struct ARAFactoryResult
String errorMessage;
};
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-field-initializers")
template <typename Obj, typename Member, typename... Ts>
constexpr Obj makeARASizedStruct (Member Obj::* member, Ts&&... ts)
{
@ -82,4 +84,6 @@ constexpr Obj makeARASizedStruct (Member Obj::* member, Ts&&... ts)
std::forward<Ts> (ts)... };
}
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
} // namespace juce

View file

@ -23,7 +23,7 @@
==============================================================================
*/
#if (JUCE_PLUGINHOST_ARA && (JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_AU) && (JUCE_MAC || JUCE_WINDOWS))
#if (JUCE_PLUGINHOST_ARA && (JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_AU) && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX))
#include "juce_ARAHosting.h"
#include <ARA_Library/Debug/ARADebug.h>

View file

@ -25,7 +25,7 @@
#pragma once
#if (JUCE_PLUGINHOST_ARA && (JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_AU) && (JUCE_MAC || JUCE_WINDOWS)) || DOXYGEN
#if (JUCE_PLUGINHOST_ARA && (JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_AU) && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)) || DOXYGEN
// Include ARA SDK headers
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wgnu-zero-variadic-macro-arguments")

View file

@ -29,7 +29,7 @@
#include "juce_VST3Common.h"
#include "juce_ARACommon.h"
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS)
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
#include <ARA_API/ARAVST3.h>
namespace ARA
@ -840,7 +840,7 @@ struct DescriptionFactory
// The match is determined by the two classes having the same name.
std::unordered_set<String> araMainFactoryClassNames;
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS)
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
for (Steinberg::int32 i = 0; i < numClasses; ++i)
{
PClassInfo info;
@ -1390,7 +1390,7 @@ static int compareWithString (Type (&charArray)[N], const String& str)
template <typename Callback>
static void forEachARAFactory (IPluginFactory* pluginFactory, Callback&& cb)
{
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS)
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
const auto numClasses = pluginFactory->countClasses();
for (Steinberg::int32 i = 0; i < numClasses; ++i)
{
@ -1413,7 +1413,7 @@ static std::shared_ptr<const ARA::ARAFactory> getARAFactory (Steinberg::IPluginF
{
std::shared_ptr<const ARA::ARAFactory> factory;
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS)
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
forEachARAFactory (pluginFactory,
[&pluginFactory, &pluginName, &factory] (const auto& pcClassInfo)
{

View file

@ -31,7 +31,7 @@
To prevent such problems it's easiest to have it in its own translation unit.
*/
#if (JucePlugin_Enable_ARA || (JUCE_PLUGINHOST_ARA && (JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_AU))) && (JUCE_MAC || JUCE_WINDOWS)
#if (JucePlugin_Enable_ARA || (JUCE_PLUGINHOST_ARA && (JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_AU))) && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wgnu-zero-variadic-macro-arguments", "-Wmissing-prototypes")
#include <ARA_Library/Debug/ARADebug.c>