Function

MusicEventIteratorSeek(_:_:)

Positions a music event iterator at a specified timestamp, in beats.

Declaration

func MusicEventIteratorSeek(_ inIterator: MusicEventIterator, _ inTimeStamp: MusicTimeStamp) -> OSStatus

Parameters

inIterator

The music event iterator that you want to position along a music track.

inTimeStamp

The new position for the music event iterator, in beats.

If there is no music event at the specified time, on output the iterator points to the first event after that time.

To position the iterator immediately beyond the final event of a music track, specify kMusicTimeStamp_EndOfTrack for this parameter. You can then call the MusicEventIteratorPreviousEvent(_:) to backtrack to the final event of the music track.

To position the iterator at the first event of a music track, specify a value of 0 for this parameter.

Return Value

A result code.