---
title: numberOfLoops
framework: avfaudio
role: symbol
role_heading: Instance Property
path: avfaudio/avmusictrack/numberofloops
---

# numberOfLoops

The number of times the track’s loop repeats.

## Declaration

```swift
var numberOfLoops: Int { get set }
```

## Discussion

Discussion Use the value AVMusicTrackLoopCount.forever to loop the track forever. Otherwise, valid values start at 1.

## See Also

### Configuring the Looping State

- [isLoopingEnabled](avfaudio/avmusictrack/isloopingenabled.md)
- [loopRange](avfaudio/avmusictrack/looprange.md)
