<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/MusicTrackSetProperty(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:@F@MusicTrackSetProperty"
  },
  "title" : "MusicTrackSetProperty(_:_:_:_:)"
}
-->

# MusicTrackSetProperty(_:_:_:_:)

Sets a music track property value.

```
func MusicTrackSetProperty(_ inTrack: MusicTrack, _ inPropertyID: UInt32, _ inData: UnsafeMutableRawPointer, _ inLength: UInt32) -> OSStatus
```

## Parameters

`inTrack`

The music track that you want to set a property value for.

`inPropertyID`

The identifier for the music track property that you want to set. See [Music Track Properties](/documentation/AudioToolbox/1515456-music-track-properties) for possible values.

`inData`

The new property value.

`inLength`

The size of the new property value.

## Return Value

A result code.

## Discussion

Music track property values are always accessed by reference.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)