source: trunk/third/audiofile/docs/afGetTrackBytes @ 17099

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