How to declare an "array of three AudioBuffers" properly in a header file (PluginProcessor.h)?

I know its more fashionable to use vectors, however, I would like to know how I can declare an array of 3 AudioBuffers in PluginProcessor.h, and then instantiate it in PluginProcessor.cpp.

Here’s what I have, but it doesn’t give out the info that its an array in the .h file - is that important?:

And in PluginProcessor.cpp

So, the above is an array of 3 AudioBuffers. I’m going to setSize() them a bit later.
I am using arrays because I am slightly more familiar with them than vectors.

your two declarations are in no way the same. why do you not just have the second one (which is the correct declaration of an std::array of 3 audio buffers) in the header, and just refer to IansAudioBuffers in the cpp?

1 Like