I'm working on a software that needs to manage complex connections between AudioProcessors in a AudioProcessorGraph.
I've read the API doc for AudioProcessorGraph a few times, and there's some things I can't figure out.
There's removeConnection (int index) and getConnection (int index) functions, but how can I get the index of a Connection?
The OwnedArray<Connection> connections is a private member of AudioProcessorGraph, and I can't find any elegant way to access it. There's obviously no getAllConnections() function that would return this array.
I need to create functions such as getConnectionsForNode that would return an array of indexes or Connection*. Or a getConnectionsBetween, without specifing channels. It would be pretty easy if I could search the OwnedArray<Connection> in some way...
The idea is not to manage Connection pointers outstide of the Graph, i would still use the Graph procedures to remove/add connections.
The only way I found for now is either to kind of mirror every connections and disconnections with my own data structure, or to hack the AudioProcessorGraph class to make my class a friend, wich is pretty bad...
But maybe I'm missing something.