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

# MusicPlayerIsPlaying(_:_:)

Indicates whether or not a music player is playing.

```
func MusicPlayerIsPlaying(_ inPlayer: MusicPlayer, _ outIsPlaying: UnsafeMutablePointer<DarwinBoolean>) -> OSStatus
```

## Parameters

`inPlayer`

The music player to query.

`outIsPlaying`

On output `true` (nonzero) if playing, `false` (zero) if not playing.

## Return Value

A result code

## Discussion

If a music player has started playing and has not been explicitly stopped, the `outIsPlaying` value is `true`. Specifically, if the player’s music sequence has completed—so there is no more audible output—but the player has not been explicitly stopped, the `outIsPlaying` value is `true` and the music player’s time value continues to increase.

---

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)