File: afGetFrameSize.3

package info (click to toggle)
audiofile 0.3.4-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,192 kB
  • sloc: cpp: 31,691; sh: 11,006; ansic: 3,773; makefile: 271
file content (57 lines) | stat: -rw-r--r-- 2,701 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
'\" t
.\"     Title: afGetFrameSize
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\"      Date: 04/30/2012
.\"    Manual: \ \&
.\"    Source: Audio File Library 0.3.4
.\"  Language: English
.\"
.TH "AFGETFRAMESIZE" "3" "04/30/2012" "Audio File Library 0\&.3\&.4" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
afGetFrameSize \- calculate the frame size in bytes for an audio track
.SH "SYNOPSIS"
.sp
.nf
#include <audiofile\&.h>
.fi
.sp
.nf
float afGetFrameSize (AFfilehandle file, int track, int expand3to4);
.fi
.SH "PARAMETERS"
.sp
\fIfile\fR is a valid AFfilehandle\&.
.sp
\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\&.
.sp
\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\&.
.SH "DESCRIPTION"
.sp
afGetFrameSize returns the number of bytes in a frame in a given audio track\&.
.sp
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\&.
.sp
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\&.
.SH "AUTHOR"
.sp
Michael Pruett <michael@68k\&.org>