I'm interested in wrapping some C++ libraries as react-native modules but I'm hitting a bit of a conceptual wall. Very new to this stuff so bear with me!
I want to wrap something like the AudioProcessorGraph functionality of Juce https://juce.com/doc/classAudioProcessorGraph_1_1AudioGraphIOProcessor
However a big component of the api is connecting audio node objects to each other to form an audio processing graph. You can imagine something very similar to the web audio api:
const audioCtx = new AudioContext();
const oscillator = new OscillatorNode(audioCtx);
const gainNode = new GainNode(audioCtx);
oscillator.connect(gainNode).connect(audioCtx.destination);
The problem I'm seeing, before I even write a single line of code, is that I don't see a way with the RCT_EXPORT_METHOD macro to pass an instance of a native object as an argument to a method call of another native object. https://nodejs.org/api/addons.html#addons_wrapping_c_objects I've done similar things with native node addons using the ObjectWrap functionality. Is there anyway to accomplish something similar with react-native?