mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AudioProcessorGraph: Ensure graph is rebuilt if any node bus layouts change
This commit is contained in:
parent
221d1aa6cf
commit
d30f51ff00
1 changed files with 7 additions and 6 deletions
|
|
@ -1566,27 +1566,28 @@ class RenderSequenceSignature
|
|||
|
||||
public:
|
||||
RenderSequenceSignature (const PrepareSettings s, const Nodes& n, const Connections& c)
|
||||
: settings (s), connections (c), nodes (getNodeIDs (n)) {}
|
||||
: settings (s), connections (c), nodes (getNodeMap (n)) {}
|
||||
|
||||
bool operator== (const RenderSequenceSignature& other) const { return tie() == other.tie(); }
|
||||
bool operator!= (const RenderSequenceSignature& other) const { return tie() != other.tie(); }
|
||||
|
||||
private:
|
||||
static std::vector<AudioProcessorGraph::NodeID> getNodeIDs (const Nodes& n)
|
||||
using NodeMap = std::map<AudioProcessorGraph::NodeID, AudioProcessor::BusesLayout>;
|
||||
|
||||
static NodeMap getNodeMap (const Nodes& n)
|
||||
{
|
||||
const auto& nodeRefs = n.getNodes();
|
||||
std::vector<AudioProcessorGraph::NodeID> result;
|
||||
result.reserve ((size_t) nodeRefs.size());
|
||||
NodeMap result;
|
||||
|
||||
for (const auto& node : nodeRefs)
|
||||
result.push_back (node->nodeID);
|
||||
result.emplace (node->nodeID, node->getProcessor()->getBusesLayout());
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
PrepareSettings settings;
|
||||
Connections connections;
|
||||
std::vector<AudioProcessorGraph::NodeID> nodes;
|
||||
NodeMap nodes;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue