1AFSEEKFRAME(3) AFSEEKFRAME(3)
2
3
4
6 afSeekFrame, afTellFrame - update or access the current sample frame
7 position for a track in an audio file
8
10 #include <audiofile.h>
11
12 AFframecount afSeekFrame(AFfilehandle file, int track,
13 AFframecount frameOffset);
14
15 AFframecount afTellFrame(AFfilehandle file, int track);
16
18 file is a valid audio file handle created by afOpenFile(3).
19
20 track identifies an audio track within the file. track is always
21 AF_DEFAULT_TRACK for all currently supported audio file formats.
22
23 frameOffset is a sample frame offset. Valid sample frame offsets must
24 be greater than or equal to zero and strictly less than the number of
25 sample frames contained within the specified audio track. The special
26 value -1 is also allowed.
27
29 afSeekFrame moves the logical file position for a specified audio track
30 to a desired sample frame location. If frameOffset is -1, afSeekFrame
31 will not modify the current file offset and will instead return the
32 current file position.
33
34 afTellFrame returns current file position in sample frames.
35
37 On success, afSeekFrame and afTellFrame will return the current file
38 position as measured in sample frames from the start of the audio
39 track. On failure, afSeekFrame and afTellFrame will return the value
40 -1.
41
43 The following errors can be generated by afSeekFrame or afTellFrame:
44
45 AF_BAD_FILEHANDLE
46
47 file does not represent a valid file handle.
48
49 AF_BAD_TRACK
50
51 track does not identify a valid track.
52
53 AF_BAD_LSEEK
54 A call to lseek failed.
55
57 Michael Pruett <michael@68k.org>
58
59
60
61Audio File Library 0.3.6 03/06/2013 AFSEEKFRAME(3)