[PD] ring buffer with an array