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

# MusicPlayerGetSequence(_:_:)

Gets the music sequence associated with a music player.

```
func MusicPlayerGetSequence(_ inPlayer: MusicPlayer, _ outSequence: UnsafeMutablePointer<MusicSequence?>) -> OSStatus
```

## Parameters

`inPlayer`

The music player whose music sequence you want to get.

`outSequence`

On output, the music sequence associated with the music player.

## Return Value

A result code. If the music player does not have a sequence set, this function returns `kAudioToolboxErr_NoSequence`.

---

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)