---
title: "NextAudioFileRegion(_:)"
framework: audiotoolbox
role: symbol
role_heading: Function
path: "audiotoolbox/nextaudiofileregion(_:)"
---

# NextAudioFileRegion(_:)

Finds the next audio file region in a region list.

## Declaration

```swift
func NextAudioFileRegion(_ inAFRegionPtr: UnsafePointer<AudioFileRegion>) -> UnsafeMutablePointer<AudioFileRegion>
```

## Parameters

- `inAFRegionPtr`: A pointer to an audio file region in the region list.

## Return Value

Return Value A pointer to the next region after the region pointed to by the inAFRegionPtr parameter. This value can be beyond the end of the list, so pay attention to the total number of regions in the list.

## Discussion

Discussion Because audio file regions are of variable length, you cannot easily walk the list. Use this convenience function when you call the AudioFileGetProperty(_:_:_:_:) function with the kAudioFilePropertyRegionList property to walk through the list of regions returned.

## See Also

### Related Documentation

- [AudioFileSetProperty(_:_:_:_:)](audiotoolbox/audiofilesetproperty(_:_:_:_:).md)

### Parsing Audio File Content

- [NumAudioFileMarkersToNumBytes(_:)](audiotoolbox/numaudiofilemarkerstonumbytes(_:).md)
- [NumBytesToNumAudioFileMarkers(_:)](audiotoolbox/numbytestonumaudiofilemarkers(_:).md)
