replay method

void replay()

Seeks back to the beginning and starts playing.

Useful for non-looping clips that were left paused at their end after a previous play, where the natural game-loop pattern of clip.playing = someCondition doesn't trigger a fresh play. Equivalent to seek(0); play();.

Implementation

void replay() {
  seek(0);
  playing = true;
}