Timing issue while playing a buffer in loop

As James said, that’s not possible in realtime in principle, see

Another issue here is that you’d need OffsetOut, but even this doesn’t cause sample-exact timing.

Apart from that, seamless looping (of arbitrary buffers) needs crossfading. You can check PlayBufCF from wslib or DX ugens from miSCellaneous_lib