I apologize for a potential stupid question in advance. This seems too big of an issue no one to have hit it before, so I probably am too tired and just don’t see something obvious here.
I am buffering the last few seconds of my plugin’s output, for analysis on a different thread.
In order not to lock the Audio Thread while buffering, I use an AbstractFifo. But I am puzzled by it having int’s for all indexes and size… For example if I have a 192kHz signal, 5 sec would amount to:
5 * 192 000 = 960 000 samples
Even if I buffer only small chunks (say, every block call) of samples, I would still get indexes that can’t be represented as int’s, right?
Shouldn’t the AbstractFifo be templated so we can use it with larger size arrays/buffer/etc.?
Thanks for the input and again - sorry if the question is not appropriate.
Seems on modern compilers
int is no longer
+-2^15, but is instead equal to
long, which is
So AbstractFifo should work just fine up until
2 147 483 647 items.