---
title: audioSyncPacketFrequency
framework: avfaudio
role: symbol
role_heading: Instance Property
path: avfaudio/avaudioconverter/audiosyncpacketfrequency
---

# audioSyncPacketFrequency

## Declaration

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

## Discussion

Discussion Number of packets between consecutive sync packets. A sync packet is an independently-decodable packet that completely refreshes the decoder without needing to decode other packets.  When compressing to a format which supports it (such as APAC), the audio sync packet frequency indicates the distance in packets between two sync packets, with non-sync packets between.  This is useful to set when saving compressed packets to a file and efficient random access is desired.  Note: Separating sync packets by at least one second of encoded audio (e.g. 75 packets) is recommended.

## See Also

### Managing packet dependencies

- [contentSource](avfaudio/avaudioconverter/contentsource.md)
- [AVAudioContentSource](avfaudio/avaudiocontentsource.md)
- [dynamicRangeControlConfiguration](avfaudio/avaudioconverter/dynamicrangecontrolconfiguration.md)
- [AVAudioDynamicRangeControlConfiguration](avfaudio/avaudiodynamicrangecontrolconfiguration.md)
