| 1 |
afGetFrameCount(3) |
| 2 |
================== |
| 3 |
|
| 4 |
NAME |
| 5 |
---- |
| 6 |
afGetFrameCount, afGetTrackBytes, afGetDataOffset - get the total sample |
| 7 |
frame count, length of audio track in bytes, offset of the audio track for a |
| 8 |
track in an audio file |
| 9 |
|
| 10 |
|
| 11 |
SYNOPSIS |
| 12 |
-------- |
| 13 |
#include <audiofile.h> |
| 14 |
|
| 15 |
AFframecount afGetFrameCount (AFfilehandle file, int track); |
| 16 |
|
| 17 |
AFfileoffset afGetTrackBytes (AFfilehandle file, int track); |
| 18 |
|
| 19 |
AFfileoffset afGetDataOffset (AFfilehandle file, int track); |
| 20 |
|
| 21 |
|
| 22 |
PARAMETERS |
| 23 |
---------- |
| 24 |
'file' is an audio file handle created by a previous call to |
| 25 |
linkaf:afOpenFile[3]. |
| 26 |
|
| 27 |
'track' is an integer which specifies an audio track within 'file'. |
| 28 |
All supported file formats contain exactly one audio track per file, |
| 29 |
so the constant `AF_DEFAULT_TRACK` should always be used. |
| 30 |
|
| 31 |
|
| 32 |
DESCRIPTION |
| 33 |
----------- |
| 34 |
`afGetFrameCount` returns the total number of sample frames contained |
| 35 |
within the specified track of the specified file. |
| 36 |
|
| 37 |
Each sample frame of audio consists of a fixed number of samples |
| 38 |
(equal to the number of audio channels in the track. For monaural data, |
| 39 |
a sample frame consists of one audio sample. For stereophonic data, |
| 40 |
a sample frame consists of a stereo pair. |
| 41 |
|
| 42 |
`afGetTrackBytes` returns the total number of bytes of raw audio data |
| 43 |
(i.e., prior to decompression or conversion) in the track. |
| 44 |
|
| 45 |
`afGetDataOffset` returns the offset in bytes of the start of the audio |
| 46 |
data contained within the specified track of the specified file. |
| 47 |
|
| 48 |
|
| 49 |
RETURN VALUE |
| 50 |
------------ |
| 51 |
`afGetFrameCount` returns the total number of sample frames in 'track'. |
| 52 |
|
| 53 |
`afGetTrackBytes` returns the total number of bytes of audio data |
| 54 |
in 'track'. |
| 55 |
|
| 56 |
`afGetDataOffset` returns the offset in bytes to the beginning of the |
| 57 |
audio data in 'track'. |
| 58 |
|
| 59 |
Each of these routines returns -1 in case of error. |
| 60 |
|
| 61 |
AUTHOR |
| 62 |
------ |
| 63 |
Michael Pruett <[email protected]> |