Debian Codegraph @

docs/afSeekFrame.3

raw
1 '\" t
2 .\" Title: afSeekFrame
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5 .\" Date: 03/06/2013
6 .\" Manual: \ \&
7 .\" Source: Audio File Library 0.3.6
8 .\" Language: English
9 .\"
10 .TH "AFSEEKFRAME" "3" "03/06/2013" "Audio File Library 0\&.3\&.6" "\ \&"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 afSeekFrame, afTellFrame \- update or access the current sample frame position for a track in an audio file
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 #include <audiofile\&.h>
36 .fi
37 .sp
38 .nf
39 AFframecount afSeekFrame(AFfilehandle file, int track,
40 AFframecount frameOffset);
41 .fi
42 .sp
43 .nf
44 AFframecount afTellFrame(AFfilehandle file, int track);
45 .fi
46 .SH "PARAMETERS"
47 .sp
48 \fIfile\fR is a valid audio file handle created by \fBafOpenFile\fR(3)\&.
49 .sp
50 \fItrack\fR identifies an audio track within the file\&. track is always AF_DEFAULT_TRACK for all currently supported audio file formats\&.
51 .sp
52 \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\&.
53 .SH "DESCRIPTION"
54 .sp
55 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\&.
56 .sp
57 afTellFrame returns current file position in sample frames\&.
58 .SH "RETURN VALUE"
59 .sp
60 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\&.
61 .SH "ERRORS"
62 .sp
63 The following errors can be generated by afSeekFrame or afTellFrame:
64 .PP
65 AF_BAD_FILEHANDLE
66 .RS 4
67
68 file
69 does not represent a valid file handle\&.
70 .RE
71 .PP
72 AF_BAD_TRACK
73 .RS 4
74
75 track
76 does not identify a valid track\&.
77 .RE
78 .PP
79 AF_BAD_LSEEK
80 .RS 4
81 A call to
82 lseek
83 failed\&.
84 .RE
85 .SH "AUTHOR"
86 .sp
87 Michael Pruett <michael@68k\&.org>