---
title: "init(loopDuration:numberOfLoops:)"
framework: audiotoolbox
role: symbol
role_heading: Initializer
path: "audiotoolbox/musictrackloopinfo/init(loopduration:numberofloops:)"
---

# init(loopDuration:numberOfLoops:)

Initializes the music track loop information.

## Declaration

```swift
init(loopDuration: MusicTimeStamp, numberOfLoops: Int32)
```

## Parameters

- `loopDuration`: The point in a music track, measured in beats from the end of the music track, at which to begin playback during looped playback. To explicitly turn off looping, specify a loopDuration of 0.
- `numberOfLoops`: The number of times to play the designated portion of the music track. To loop forever, set numberOfLoops to 0.
