ExtAudioFileSeek(_:_:)
Seeks to a specified frame in a file.
Declaration
func ExtAudioFileSeek(_ inExtAudioFile: ExtAudioFileRef, _ inFrameOffset: Int64) -> OSStatusParameters
- inExtAudioFile:
The extended audio file object that represents the file you are working with.
- inFrameOffset:
The desired seek position, in sample frames, relative to the beginning of the file. Seek position is specified in the sample rate and frame count of the file’s audio data format—not your application’s audio data format.
Return Value
A result code.
Discussion
Sets the file’s read position to the specified sample frame number. A subsequent call to the ExtAudioFileRead(_:_:_:) function returns samples from precisely this location, even if it is located in the middle of a packet.
Ensure that the file you are seeking in is open for reading only. This function’s behavior with files open for writing is undefined.