Hijacking the post (but with some correlation to the class calls):
I’ve a FileLoader class that uses it’s own thread to load a file and then giving a pointer to the AudioBuffer it’s stored. Since I’ll be using that AudioBuffer to be read in an oscillator in a Synth with multiple voices, I’d like to call it only once in the AudioProcessor and pass it to the Oscillator (AudioProcessor->Synth->Voice->Oscillator), otherwise loading the file in the Osc itself (which would avoid a lot of passing mess) is really inefficient since it will create a background thread + load the same file for each voice.
But making setters from the processor to the oscillator seems kinda dirty somehow.
Which would be the neatest way to pass the buffer pointer to the Osc? Or I’m just overcomplicating this and can be made in a simpler way?