Contents

playAudio(at:)

Declaration

func playAudio(at when: AVAudioTime?) throws

Parameters

  • when:

    The node time at which to start or resume playback. nil signifies “now”.

Discussion

Start or resume playback at a specific time.

This node is initially paused. Requests to play buffers or file segments are enqueued, and any necessary decoding begins immediately. Playback does not begin, however, until the player has started playing, via this method.

Note that providing an AVAudioTime which is past (before lastRenderTime) will cause the player to begin playback immediately.

E.g. To start a player X seconds in future:

See Also

Controlling Playback