I have a plugin that uses multiple outputs whenever a DAW can support them. It works in most places but sometimes throws an access violation in some DAWs. I check for output pin 3 connection, for example, using IsChannelConnected(ERoute::kOutput, 2) but I’m finding that check to be unreliable. It can return TRUE but then I get an access violation when trying to write back to *out3 due to either a NULL or overflowing (0xFFFFFFFFFFF) pointer.
So, how do we set up additional I/O pins and make sure they actually exist/are connected in the DAW?