'\" t .\" Title: afSeekFrame .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/06/2013 .\" Manual: \ \& .\" Source: Audio File Library 0.3.6 .\" Language: English .\" .TH "AFSEEKFRAME" "3" "03/06/2013" "Audio File Library 0\&.3\&.6" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" afSeekFrame, afTellFrame \- update or access the current sample frame position for a track in an audio file .SH "SYNOPSIS" .sp .nf #include .fi .sp .nf AFframecount afSeekFrame(AFfilehandle file, int track, AFframecount frameOffset); .fi .sp .nf AFframecount afTellFrame(AFfilehandle file, int track); .fi .SH "PARAMETERS" .sp \fIfile\fR is a valid audio file handle created by \fBafOpenFile\fR(3)\&. .sp \fItrack\fR identifies an audio track within the file\&. track is always AF_DEFAULT_TRACK for all currently supported audio file formats\&. .sp \fIframeOffset\fR is a sample frame offset\&. Valid sample frame offsets must be greater than or equal to zero and strictly less than the number of sample frames contained within the specified audio track\&. The special value \-1 is also allowed\&. .SH "DESCRIPTION" .sp afSeekFrame moves the logical file position for a specified audio track to a desired sample frame location\&. If frameOffset is \-1, afSeekFrame will not modify the current file offset and will instead return the current file position\&. .sp afTellFrame returns current file position in sample frames\&. .SH "RETURN VALUE" .sp On success, afSeekFrame and afTellFrame will return the current file position as measured in sample frames from the start of the audio track\&. On failure, afSeekFrame and afTellFrame will return the value \-1\&. .SH "ERRORS" .sp The following errors can be generated by afSeekFrame or afTellFrame: .PP AF_BAD_FILEHANDLE .RS 4 file does not represent a valid file handle\&. .RE .PP AF_BAD_TRACK .RS 4 track does not identify a valid track\&. .RE .PP AF_BAD_LSEEK .RS 4 A call to lseek failed\&. .RE .SH "AUTHOR" .sp Michael Pruett