---
title: "AudioFileStreamSeek(_:_:_:_:)"
framework: audiotoolbox
role: symbol
role_heading: Function
path: "audiotoolbox/audiofilestreamseek(_:_:_:_:)"
---

# AudioFileStreamSeek(_:_:_:_:)

Provides a byte offset for a specified packet in the data stream.

## Declaration

```swift
func AudioFileStreamSeek(_ inAudioFileStream: AudioFileStreamID, _ inPacketOffset: Int64, _ outDataByteOffset: UnsafeMutablePointer<Int64>, _ ioFlags: UnsafeMutablePointer<AudioFileStreamSeekFlags>) -> OSStatus
```

## Parameters

- `inAudioFileStream`: The ID of the parser to which you wish to provide a byte offset. The parser ID is returned by the doc://com.apple.audiotoolbox/documentation/AudioToolbox/AudioFileStreamOpen(_:_:_:_:_:) function.
- `inPacketOffset`: The number of packets from the beginning of the file of the packet whose byte offset you wish to have returned.
- `outDataByteOffset`: On output, the absolute byte offset of the packet whose offset you specify in the inPacketOffset parameter. For audio file formats that do not contain packet tables, the returned offset may be an estimate.
- `ioFlags`: On output, if the outDataByteOffset parameter returns an estimate, this parameter returns the constant kAudioFileStreamSeekFlag_OffsetIsEstimated. Currently, no input flags are defined for this call.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion After you call this function, the parser assumes the next data passed to the AudioFileStreamParseBytes(_:_:_:_:) function starts from the byte offset returned in the outDataByteOffset parameter.

## See Also

### Related Documentation

- [AudioFileStreamParseBytes(_:_:_:_:)](audiotoolbox/audiofilestreamparsebytes(_:_:_:_:).md)
- [AudioFileStreamOpen(_:_:_:_:_:)](audiotoolbox/audiofilestreamopen(_:_:_:_:_:).md)
