Hey everyone I’m trying to create a nice and simple circular buffer
this is how it’s done using boost:
#include <queue> #include <boost/circular_buffer.hpp> typedef std::queue<my_type, boost::circular_buffer<my_type>> my_queue; const int n = 3; // this sets the buffer size ... my_queue q(boost::circular_buffer<my_type>(n)); q.push(1); q.push(2); q.push(3); q.push(4); // queue now contains 2,3,4
Is there an equally simple way to achieve this outcome using JUCE ?
I had a poke around at stuff like AbstractFifo but that seemed to be overly complicated for a relatively simple procedure.