1AFGETFRAMECOUNT(3)                                          AFGETFRAMECOUNT(3)
2
3
4

NAME

6       afGetFrameCount, afGetTrackBytes, afGetDataOffset - get the total
7       sample frame count, length of audio track in bytes, offset of the audio
8       track for a track in an audio file
9

SYNOPSIS

11       #include <audiofile.h>
12
13       AFframecount afGetFrameCount (AFfilehandle file, int track);
14
15       AFfileoffset afGetTrackBytes (AFfilehandle file, int track);
16
17       AFfileoffset afGetDataOffset (AFfilehandle file, int track);
18

PARAMETERS

20       file is an audio file handle created by a previous call to
21       afOpenFile(3).
22
23       track is an integer which specifies an audio track within file. All
24       supported file formats contain exactly one audio track per file, so the
25       constant AF_DEFAULT_TRACK should always be used.
26

DESCRIPTION

28       afGetFrameCount returns the total number of sample frames contained
29       within the specified track of the specified file.
30
31       Each sample frame of audio consists of a fixed number of samples (equal
32       to the number of audio channels in the track. For monaural data, a
33       sample frame consists of one audio sample. For stereophonic data, a
34       sample frame consists of a stereo pair.
35
36       afGetTrackBytes returns the total number of bytes of raw audio data
37       (i.e., prior to decompression or conversion) in the track.
38
39       afGetDataOffset returns the offset in bytes of the start of the audio
40       data contained within the specified track of the specified file.
41

RETURN VALUE

43       afGetFrameCount returns the total number of sample frames in track.
44
45       afGetTrackBytes returns the total number of bytes of audio data in
46       track.
47
48       afGetDataOffset returns the offset in bytes to the beginning of the
49       audio data in track.
50
51       Each of these routines returns -1 in case of error.
52

AUTHOR

54       Michael Pruett <michael@68k.org>
55
56
57
58Audio File Library 0.3.6          03/06/2013                AFGETFRAMECOUNT(3)
Impressum