1AFGETFRAMESIZE(3)                                            AFGETFRAMESIZE(3)
2
3
4

NAME

6       afGetFrameSize - calculate the frame size in bytes for an audio track
7

SYNOPSIS

9       #include <audiofile.h>
10
11       float afGetFrameSize (AFfilehandle file, int track, int expand3to4);
12

PARAMETERS

14       file is a valid AFfilehandle.
15
16       track is an integer which refers to a specific audio track in the file.
17       At present no supported audio file format allows for more than one
18       audio track within a file, so track should always be AF_DEFAULT_TRACK.
19
20       expand3to4 is a boolean-valued integer indicating whether frame size
21       calculation will treat 24-bit data as having a size of 3 bytes or 4
22       bytes.
23

DESCRIPTION

25       afGetFrameSize returns the number of bytes in a frame in a given audio
26       track.
27
28       A sample frame consists of one or more samples. For a monaural track, a
29       sample frame will always contain one sample. For a stereophonic track,
30       a sample frame will always contain two samples, one for the left
31       channel and one for the right channel.
32
33       A non-zero value of expand3to4 should be used when calculating the
34       frame size for storage in memory (since 24-bit audio data is presented
35       in memory as a 4-byte sign-extended integer), while a value of zero
36       should be used for calculating storage on disk where no padding is
37       added. The parameter expand3to4 is ignored unless the specified audio
38       track contains 24-bit audio data.
39

AUTHOR

41       Michael Pruett <michael@68k.org>
42
43
44
45Audio File Library 0.3.6          03/06/2013                 AFGETFRAMESIZE(3)
Impressum