fix macOS build (following Projucer changes made in Windows, which removed /Applications/JUCE/modules from its headers). move JUCE headers under source control, so that Windows and macOS can both build against same version of JUCE. remove AUv3 target (I think it's an iOS thing, so it will never work with this macOS fluidsynth dylib).

This commit is contained in:
Alex Birch
2018-06-17 13:34:53 +01:00
parent a2be47c887
commit dff4d13a1d
1563 changed files with 601601 additions and 3466 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,88 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2017 - ROLI Ltd.
JUCE is an open source library subject to commercial or open-source
licensing.
The code included in this file is provided under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
To use, copy, modify, and/or distribute this software for any purpose with or
without fee is hereby granted provided that the above copyright notice and
this permission notice appear in all copies.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
/**
This topology source manages the topology of the physical Blocks devices
that are currently connected. It maintains a list of them and tells
listeners when physical devices are added or removed.
@tags{Blocks}
*/
class PhysicalTopologySource : public TopologySource
{
public:
/** Constructor. */
PhysicalTopologySource();
/** Destructor. */
~PhysicalTopologySource();
/** Returns the current physical topology. */
BlockTopology getCurrentTopology() const override;
/** Reset all touches */
void cancelAllActiveTouches() noexcept override;
//==========================================================================
/** For custom transport systems, this represents a connected device */
struct DeviceConnection
{
DeviceConnection();
virtual ~DeviceConnection();
virtual bool sendMessageToDevice (const void* data, size_t dataSize) = 0;
std::function<void (const void* data, size_t dataSize)> handleMessageFromDevice;
};
/** For custom transport systems, this represents a connected device */
struct DeviceDetector
{
DeviceDetector();
virtual ~DeviceDetector();
virtual juce::StringArray scanForDevices() = 0;
virtual DeviceConnection* openDevice (int index) = 0;
};
/** Constructor for custom transport systems. */
PhysicalTopologySource (DeviceDetector& detectorToUse);
static const char* const* getStandardLittleFootFunctions() noexcept;
protected:
virtual bool hasOwnServiceTimer() const;
virtual void handleTimerTick();
private:
//==========================================================================
struct Internal;
struct DetectorHolder;
std::unique_ptr<DetectorHolder> detector;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PhysicalTopologySource)
};
} // namespace juce

View File

@ -0,0 +1,106 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2017 - ROLI Ltd.
JUCE is an open source library subject to commercial or open-source
licensing.
The code included in this file is provided under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
To use, copy, modify, and/or distribute this software for any purpose with or
without fee is hereby granted provided that the above copyright notice and
this permission notice appear in all copies.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
struct RuleBasedTopologySource::Internal : public TopologySource::Listener,
private juce::AsyncUpdater
{
Internal (RuleBasedTopologySource& da, TopologySource& bd) : owner (da), detector (bd)
{
detector.addListener (this);
}
~Internal()
{
detector.removeListener (this);
}
void clearRules()
{
if (! rules.isEmpty())
{
rules.clear();
triggerAsyncUpdate();
}
}
void addRule (Rule* r)
{
if (r != nullptr)
{
rules.add (r);
triggerAsyncUpdate();
}
}
void topologyChanged() override
{
cancelPendingUpdate();
regenerateTopology();
}
void handleAsyncUpdate() override
{
topologyChanged();
}
void regenerateTopology()
{
auto newTopology = detector.getCurrentTopology();
for (auto rule : rules)
rule->transformTopology (newTopology);
if (topology != newTopology)
{
topology = newTopology;
owner.listeners.call ([] (TopologySource::Listener& l) { l.topologyChanged(); });
}
}
RuleBasedTopologySource& owner;
TopologySource& detector;
BlockTopology topology;
juce::OwnedArray<Rule> rules;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Internal)
};
RuleBasedTopologySource::RuleBasedTopologySource (TopologySource& d)
{
internal.reset (new Internal (*this, d));
}
RuleBasedTopologySource::~RuleBasedTopologySource()
{
internal = nullptr;
}
BlockTopology RuleBasedTopologySource::getCurrentTopology() const { return internal->topology; }
void RuleBasedTopologySource::clearRules() { internal->clearRules(); }
void RuleBasedTopologySource::addRule (Rule* r) { internal->addRule (r); }
} // namespace juce

View File

@ -0,0 +1,82 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2017 - ROLI Ltd.
JUCE is an open source library subject to commercial or open-source
licensing.
The code included in this file is provided under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
To use, copy, modify, and/or distribute this software for any purpose with or
without fee is hereby granted provided that the above copyright notice and
this permission notice appear in all copies.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
/** This topology source holds and applies a set of rules for transforming
one device topology into another one that may involve virtual and/or
aggregate devices.
Given an input PhysicalTopologySource and a set of Rule objects, this class
will apply the rules and present the resulting topology to clients.
@tags{Blocks}
*/
class RuleBasedTopologySource : public TopologySource
{
public:
/** Creates a RuleBasedTopologySource which wraps another TopologySource
passed in here.
*/
RuleBasedTopologySource (TopologySource&);
/** Destructor. */
~RuleBasedTopologySource();
//==========================================================================
/** Returns the currently active topology. */
BlockTopology getCurrentTopology() const;
/** A rule that can transform parts of a topology. */
struct Rule
{
virtual ~Rule() {}
/** Subclasses should implement this method and use it as their opportunity to
examine the given topology and modify it. For example they may want to substitute
one or more blocks for more specialised, aggregated Block objects.
*/
virtual void transformTopology (BlockTopology&) = 0;
};
/** Clears the list of active rules.
Calling this method will cause an asynchronous topology update if the new rule-set
results in a change to the topology.
*/
void clearRules();
/** Adds a rule to the list that will be applied.
The object passed-in will be owned by this object, so don't keep any references
to it.
Calling this method will cause an asynchronous topology update if the new rule-set
results in a change to the topology.
*/
void addRule (Rule*);
private:
//==========================================================================
struct Internal;
std::unique_ptr<Internal> internal;
};
} // namespace juce

View File

@ -0,0 +1,53 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2017 - ROLI Ltd.
JUCE is an open source library subject to commercial or open-source
licensing.
The code included in this file is provided under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
To use, copy, modify, and/or distribute this software for any purpose with or
without fee is hereby granted provided that the above copyright notice and
this permission notice appear in all copies.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
/** Describes a phyiscal connection between two ports of two block devices.
@tags{Blocks}
*/
struct BlockDeviceConnection
{
Block::UID device1, device2;
Block::ConnectionPort connectionPortOnDevice1, connectionPortOnDevice2;
bool operator== (const BlockDeviceConnection&) const noexcept;
bool operator!= (const BlockDeviceConnection&) const noexcept;
};
/** Describes a set of blocks and the connections between them.
@tags{Blocks}
*/
struct BlockTopology
{
Block::Array blocks;
juce::Array<BlockDeviceConnection> connections;
bool operator== (const BlockTopology&) const noexcept;
bool operator!= (const BlockTopology&) const noexcept;
};
} // namespace juce

View File

@ -0,0 +1,59 @@
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2017 - ROLI Ltd.
JUCE is an open source library subject to commercial or open-source
licensing.
The code included in this file is provided under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
To use, copy, modify, and/or distribute this software for any purpose with or
without fee is hereby granted provided that the above copyright notice and
this permission notice appear in all copies.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
/** Base class for an entity that provides access to a blocks topology.
@tags{Blocks}
*/
class TopologySource
{
public:
//==========================================================================
/** Destructor. */
virtual ~TopologySource() {}
/** Returns the current topology that this object manages. */
virtual BlockTopology getCurrentTopology() const = 0;
//==========================================================================
/** Used to receive callbacks for topology changes */
struct Listener
{
virtual ~Listener() {}
virtual void topologyChanged() = 0;
};
void addListener (Listener* l) { listeners.add (l); }
void removeListener (Listener* l) { listeners.remove (l); }
/** Invoke this to force touches-off on all physical devices. */
virtual void cancelAllActiveTouches() noexcept {}
protected:
//==========================================================================
juce::ListenerList<Listener> listeners;
};
} // namespace juce