flush

suspend fun flush(newGeneration: Generation)

Discards everything unplayed and invalidates the clock. This is the seek path.

Belongs to the session owner, and the feeder must be quiescent before it is called: clearing the ring writes a counter the device callback owns, and drops the timestamp segments that callback dates the clock from.

Order matters: the device is stopped before the ring is cleared, because a device still pulling from a ring being cleared would play a mixture of the old position and the new one.