Debian Codegraph @

docs/afGetFrameSize.3

raw
1 '\" t
2 .\" Title: afGetFrameSize
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5 .\" Date: 03/06/2013
6 .\" Manual: \ \&
7 .\" Source: Audio File Library 0.3.6
8 .\" Language: English
9 .\"
10 .TH "AFGETFRAMESIZE" "3" "03/06/2013" "Audio File Library 0\&.3\&.6" "\ \&"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 afGetFrameSize \- calculate the frame size in bytes for an audio track
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 #include <audiofile\&.h>
36 .fi
37 .sp
38 .nf
39 float afGetFrameSize (AFfilehandle file, int track, int expand3to4);
40 .fi
41 .SH "PARAMETERS"
42 .sp
43 \fIfile\fR is a valid AFfilehandle\&.
44 .sp
45 \fItrack\fR is an integer which refers to a specific audio track in the file\&. At present no supported audio file format allows for more than one audio track within a file, so track should always be AF_DEFAULT_TRACK\&.
46 .sp
47 \fIexpand3to4\fR is a boolean\-valued integer indicating whether frame size calculation will treat 24\-bit data as having a size of 3 bytes or 4 bytes\&.
48 .SH "DESCRIPTION"
49 .sp
50 afGetFrameSize returns the number of bytes in a frame in a given audio track\&.
51 .sp
52 A sample frame consists of one or more samples\&. For a monaural track, a sample frame will always contain one sample\&. For a stereophonic track, a sample frame will always contain two samples, one for the left channel and one for the right channel\&.
53 .sp
54 A non\-zero value of \fIexpand3to4\fR should be used when calculating the frame size for storage in memory (since 24\-bit audio data is presented in memory as a 4\-byte sign\-extended integer), while a value of zero should be used for calculating storage on disk where no padding is added\&. The parameter \fIexpand3to4\fR is ignored unless the specified audio track contains 24\-bit audio data\&.
55 .SH "AUTHOR"
56 .sp
57 Michael Pruett <michael@68k\&.org>