AudioFileStreamSeek(_:_:_:_:)
Provides a byte offset for a specified packet in the data stream.
Declaration
func AudioFileStreamSeek(_ inAudioFileStream: AudioFileStreamID, _ inPacketOffset: Int64, _ outDataByteOffset: UnsafeMutablePointer<Int64>, _ ioFlags: UnsafeMutablePointer<AudioFileStreamSeekFlags>) -> OSStatusParameters
- inAudioFileStream:
The ID of the parser to which you wish to provide a byte offset. The parser ID is returned by the 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
inPacketOffsetparameter. For audio file formats that do not contain packet tables, the returned offset may be an estimate. - ioFlags:
On output, if the
outDataByteOffsetparameter returns an estimate, this parameter returns the constantkAudioFileStreamSeekFlag_OffsetIsEstimated. Currently, no input flags are defined for this call.
Return Value
A result code. See Result Codes.
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.