---
title: prepareToPlay()
framework: musickit
role: symbol
role_heading: Instance Method
path: musickit/musicplayer/preparetoplay()
---

# prepareToPlay()

Prepares the current queue for playback, interrupting any active (nonmixable) audio sessions.

## Declaration

```swift
func prepareToPlay() async throws
```

## Discussion

Discussion Call this function to ensure that the player buffers the starting entry in the queue and that the entry is ready to play.
