1 | NAME |
---|
2 | |
---|
3 | afGetFrameCount, afGetTrackBytes, afGetDataOffset - get the total sample |
---|
4 | frame count, length of audio track in bytes, offset of the audio track for a |
---|
5 | specified audio track in a specified AFfilehandle structure |
---|
6 | |
---|
7 | |
---|
8 | SYNOPSIS |
---|
9 | |
---|
10 | #include <audiofile.h> |
---|
11 | |
---|
12 | AFframecount afGetFrameCount (AFfilehandle file, int track); |
---|
13 | |
---|
14 | AFfileoffset afGetTrackBytes (AFfilehandle file, int track); |
---|
15 | |
---|
16 | AFfileoffset afGetDataOffset (AFfilehandle file, int track); |
---|
17 | |
---|
18 | |
---|
19 | PARAMETERS |
---|
20 | |
---|
21 | file is an AFfilehandle that has been created by a previous call to |
---|
22 | afOpenFile. |
---|
23 | |
---|
24 | track is an integer which specifies an audio track within file. All |
---|
25 | supported file formats contain exactly one audio track per file, so the |
---|
26 | constant AF_DEFAULT_TRACK should always be used. |
---|
27 | |
---|
28 | |
---|
29 | DESCRIPTION |
---|
30 | |
---|
31 | afGetFrameCount returns the total number of sample frames contained |
---|
32 | within the specified track of the specified file. |
---|
33 | |
---|
34 | Each sample frame of audio consists of a fixed number of samples (equal to |
---|
35 | the number of audio channels in the file, equal to the value returned by |
---|
36 | afGetChannels for the particular track and file). For monaural data, a |
---|
37 | sample frame consists of one audio sample. For stereophonic data, a sample |
---|
38 | frame consists of a stereo pair. |
---|
39 | |
---|
40 | afGetTrackBytes returns the total number of bytes of raw audio data |
---|
41 | (i.e., prior to decompression) in track. This is useful for determining |
---|
42 | raw file seek points, etc. |
---|
43 | |
---|
44 | afGetDataOffset returns the offset in bytes of the start of the audio |
---|
45 | data contained within the specified track of the specified file. |
---|
46 | |
---|
47 | |
---|
48 | RETURN VALUE |
---|
49 | |
---|
50 | afGetFrameCount returns the total number of sample frames in track. |
---|
51 | afGetTrackBytes() returns the total number of bytes of audio data in |
---|
52 | track. afGetDataOffset() returns the offset in bytes to the beginning |
---|
53 | of the audio data in track. |
---|
54 | |
---|
55 | If an error occurs, -1 is returned by all of these routines. |
---|