<!--
{
  "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/MusicPlayerSetTime(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:@F@MusicPlayerSetTime"
  },
  "title" : "MusicPlayerSetTime(_:_:)"
}
-->

# MusicPlayerSetTime(_:_:)

Sets the playback point for a music player, in beats.

```
func MusicPlayerSetTime(_ inPlayer: MusicPlayer, _ inTime: MusicTimeStamp) -> OSStatus
```

## Parameters

`inPlayer`

The music player you want to set the playback point on.

`inTime`

The time, in beats, to set the playback point to.

## Return Value

A result code

## Discussion

You can call this function while a music player is stopped or playing. If playing at the time of the call, playback continues at the specified point. No range checking on the `inTime` value is performed by this function.

---

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)