Debian Codegraph @

docs/afGetFrameSize.3.txt

raw
1 afGetFrameSize(3)
2 =================
3
4 NAME
5 ----
6 afGetFrameSize - calculate the frame size in bytes for an audio track
7
8 SYNOPSIS
9 --------
10 #include <audiofile.h>
11
12 float afGetFrameSize (AFfilehandle file, int track, int expand3to4);
13
14 PARAMETERS
15 ----------
16 'file' is a valid AFfilehandle.
17
18 'track' is an integer which refers to a specific audio track in the
19 file. At present no supported audio file format allows for more than
20 one audio track within a file, so track should always be
21 `AF_DEFAULT_TRACK`.
22
23 'expand3to4' is a boolean-valued integer indicating whether frame size
24 calculation will treat 24-bit data as having a size of 3 bytes or 4
25 bytes.
26
27 DESCRIPTION
28 -----------
29 `afGetFrameSize` returns the number of bytes in a frame in a given
30 audio track.
31
32 A sample frame consists of one or more samples. For a monaural track,
33 a sample frame will always contain one sample. For a stereophonic
34 track, a sample frame will always contain two samples, one for the left
35 channel and one for the right channel.
36
37 A non-zero value of 'expand3to4' should be used when calculating the
38 frame size for storage in memory (since 24-bit audio data is presented
39 in memory as a 4-byte sign-extended integer), while a value of zero
40 should be used for calculating storage on disk where no padding is added.
41 The parameter 'expand3to4' is ignored unless the specified audio track
42 contains 24-bit audio data.
43
44 AUTHOR
45 ------
46 Michael Pruett <[email protected]>