Contents

MusicPlayerGetHostTimeForBeats(_:_:_:)

Gets the host time associated with a specified beat.

Declaration

func MusicPlayerGetHostTimeForBeats(_ inPlayer: MusicPlayer, _ inBeats: MusicTimeStamp, _ outHostTime: UnsafeMutablePointer<UInt64>) -> OSStatus

Parameters

  • inPlayer:

    The music player that you are querying.

  • inBeats:

    The beat number that you want the host time for.

  • outHostTime:

    On output, the host time associated with the inBeats value.

Return Value

A result code. This function returns an error if the player is not playing.

Discussion

This function is valid only if the music player is playing. For converting between beats and seconds, see MusicSequenceGetSecondsForBeats(_:_:_:) and MusicSequenceGetBeatsForSeconds(_:_:_:).

See Also

Managing a Music Player