Actually I have three AudioBuffers, and I want to create a vector of “references” or “pointers”, and I wonder which one is wisest to go with.
So, in PluginProcessor.h I have this:
AudioBuffer<float> mMybuffer1;
AudioBuffer<float> mMybuffer2;
AudioBuffer<float> mMybuffer3;
Now I want to create a vector which holds the addresses of these three buffers. I could do it with pointers. PluginProcessor.h:
std::vector<AudioBuffer<float> *> my_vector_of_pointers = { &mMybuffer1, &mMybuffer2, &mMybuffer3 };
Or references (is this declaration correct?):
std::vector<AudioBuffer<float> &> my_vector_of_references = { &mMybuffer1, &mMybuffer2, &mMybuffer3 };
Which method would be wisest to use in the context of Juce?