Thinking on it... its not quite right...
its a ring buffer, you need to know current position, and current start position and length...
my off the cuff doesn't take into account start position, and then you have to make sure the ring part is taken into account... wrapping around and all that.
So thats something to work on :)
its a ring buffer, you need to know current position, and current start position and length...
my off the cuff doesn't take into account start position, and then you have to make sure the ring part is taken into account... wrapping around and all that.
So thats something to work on :)