Contents

MusicTrackGetProperty(_:_:_:_:)

Gets a music track property value.

Declaration

func MusicTrackGetProperty(_ inTrack: MusicTrack, _ inPropertyID: UInt32, _ outData: UnsafeMutableRawPointer, _ ioLength: UnsafeMutablePointer<UInt32>) -> OSStatus

Parameters

  • inTrack:

    The music track that you want to get a property value from.

  • inPropertyID:

    The identifier for the music track property that you want to get. See 1515456 Music Track Properties for possible values.

  • outData:

    On output, the requested property value.

  • ioLength:

    On input, the available size for the retrieved property value. On output, the size of the valid property data that outData points to.

Return Value

A result code.

Discussion

Music track property values are always accessed by reference. As of OS X v10.6, all such property values are fixed length.

This function’s main purpose is to retrieve a music track property value, but you also use it to obtain the size of a variable-length property. Do this, prior to retrieving a variable-length property value, to ensure that you allocate enough memory in outData to hold the value.

To obtain a property value’s size, call this function with the outData parameter set to NULL. On output, the ioLength parameter contains the property size.

See Also

Managing Music Tracks