afSeekFrame
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
afSeekFrame moves the logical file pointer for a specified audio track
to a desired sample frame location.
afTellFrame retrieves current value of a file read or write pointer.
SYNOPSIS
#include <audiofile.h>
AFframecount afSeekFrame (const AFfilehandle file, int track,
AFframecount frameoffset);
AFframecount afTellFrame (const AFfilehandle file, int track);
PARAMETERS
file is an AFfilehandle structure which has been created by
afOpenFile.
track is an integer which refers to an audio track within a file. The
constant AF_DEFAULT_TRACK should always be used for this parameter
since no currently supported file formats support more than one track
per file.
frameoffset is an offset measured in sample frames. This value must be
greater than or equal to zero and strictly less than the number of
sample frames contained within the specified audio track. If
frameoffset is -1, afSeekFrame() will return the current frame.
RETURN VALUE
On successful completion, the value returned from afSeekFrame and
afTellFrame is the current file pointer location as measured in sample
frames from the start of the audio track.
ERROR VALUES
The following errors could be generated by afSeekFrame or afTellFrame:
AF_BAD_LSEEK