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


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



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


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.