Function

MusicEventIteratorSetEventTime(_:_:)

Sets the timestamp for the event at a music event iterator’s current position.

Declaration

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

Parameters

inIterator

The music event iterator whose current event you want to change the timestamp of.

inTimeStamp

The new timestamp for the event, in beats.

Return Value

A result code.

Discussion

After calling this function, the music event iterator remains positioned at the same event. However, because the event has been moved to a new location on the iterator’s music track, the iterator may no longer have a next or previous event. You can test this by calling MusicEventIteratorHasPreviousEvent(_:_:) and MusicEventIteratorHasNextEvent(_:_:).

See Also