| 1 |
'\" t |
| 2 |
.\" Title: afSetVirtualSampleFormat |
| 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 "AFSETVIRTUALSAMPLEFO" "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 |
afSetVirtualByteOrder, afSetVirtualChannels, afSetVirtualPCMMapping, afSetVirtualSampleFormat \- set the virtual data format for a track in an audio file |
| 32 |
.SH "SYNOPSIS" |
| 33 |
.sp |
| 34 |
.nf |
| 35 |
#include <audiofile\&.h> |
| 36 |
.fi |
| 37 |
.sp |
| 38 |
.nf |
| 39 |
int afSetVirtualByteOrder (AFfilehandle file, int track, int byteOrder); |
| 40 |
.fi |
| 41 |
.sp |
| 42 |
.nf |
| 43 |
int afSetVirtualChannels (AFfilehandle file, int track, int channels); |
| 44 |
.fi |
| 45 |
.sp |
| 46 |
.nf |
| 47 |
int afSetVirtualSampleFormat (AFfilehandle file, int track, |
| 48 |
int sampleFormat, int sampleWidth); |
| 49 |
.fi |
| 50 |
.sp |
| 51 |
.nf |
| 52 |
int afSetVirtualPCMMapping (AFfilehandle file, int track, |
| 53 |
double slope, double intercept, double minclip, double maxclip); |
| 54 |
.fi |
| 55 |
.SH "PARAMETERS" |
| 56 |
.sp |
| 57 |
.RS 4 |
| 58 |
.ie n \{\ |
| 59 |
\h'-04'\(bu\h'+03'\c |
| 60 |
.\} |
| 61 |
.el \{\ |
| 62 |
.sp -1 |
| 63 |
.IP \(bu 2.3 |
| 64 |
.\} |
| 65 |
|
| 66 |
\fIfile\fR |
| 67 |
is an AFfilehandle which refers to an open audio file and is usually created by afOpenFile\&. |
| 68 |
.RE |
| 69 |
.sp |
| 70 |
.RS 4 |
| 71 |
.ie n \{\ |
| 72 |
\h'-04'\(bu\h'+03'\c |
| 73 |
.\} |
| 74 |
.el \{\ |
| 75 |
.sp -1 |
| 76 |
.IP \(bu 2.3 |
| 77 |
.\} |
| 78 |
|
| 79 |
\fItrack\fR |
| 80 |
is an integer which identifies a particular track in an open audio file\&. The only valid track is |
| 81 |
AF_DEFAULT_TRACK |
| 82 |
for all currently supported file formats\&. |
| 83 |
.RE |
| 84 |
.sp |
| 85 |
.RS 4 |
| 86 |
.ie n \{\ |
| 87 |
\h'-04'\(bu\h'+03'\c |
| 88 |
.\} |
| 89 |
.el \{\ |
| 90 |
.sp -1 |
| 91 |
.IP \(bu 2.3 |
| 92 |
.\} |
| 93 |
|
| 94 |
\fIsampleFormat\fR |
| 95 |
is an integer which denotes a virtual sample format\&. Valid values are |
| 96 |
AF_SAMPFMT_TWOSCOMP, |
| 97 |
AF_SAMPFMT_UNSIGNED, |
| 98 |
AF_SAMPFMT_FLOAT, and |
| 99 |
AF_SAMPFMT_DOUBLE\&. |
| 100 |
.RE |
| 101 |
.sp |
| 102 |
.RS 4 |
| 103 |
.ie n \{\ |
| 104 |
\h'-04'\(bu\h'+03'\c |
| 105 |
.\} |
| 106 |
.el \{\ |
| 107 |
.sp -1 |
| 108 |
.IP \(bu 2.3 |
| 109 |
.\} |
| 110 |
|
| 111 |
\fIsampleWidth\fR |
| 112 |
is a positive integer which specifies the number of bits in a sample\&. |
| 113 |
.RE |
| 114 |
.sp |
| 115 |
.RS 4 |
| 116 |
.ie n \{\ |
| 117 |
\h'-04'\(bu\h'+03'\c |
| 118 |
.\} |
| 119 |
.el \{\ |
| 120 |
.sp -1 |
| 121 |
.IP \(bu 2.3 |
| 122 |
.\} |
| 123 |
|
| 124 |
\fIchannels\fR |
| 125 |
is a positive integer which specifies the number of interleaved audio channels in the given audio track\&. |
| 126 |
.RE |
| 127 |
.sp |
| 128 |
.RS 4 |
| 129 |
.ie n \{\ |
| 130 |
\h'-04'\(bu\h'+03'\c |
| 131 |
.\} |
| 132 |
.el \{\ |
| 133 |
.sp -1 |
| 134 |
.IP \(bu 2.3 |
| 135 |
.\} |
| 136 |
|
| 137 |
\fIbyteOrder\fR |
| 138 |
is an integer which specifies the virtual byte order of samples in the given audio track\&. |
| 139 |
\fIbyteOrder\fR |
| 140 |
can be either |
| 141 |
AF_BYTEORDER_BIGENDIAN |
| 142 |
or |
| 143 |
AF_BYTEORDER_LITTLEENDIAN\&. |
| 144 |
.RE |
| 145 |
.sp |
| 146 |
.RS 4 |
| 147 |
.ie n \{\ |
| 148 |
\h'-04'\(bu\h'+03'\c |
| 149 |
.\} |
| 150 |
.el \{\ |
| 151 |
.sp -1 |
| 152 |
.IP \(bu 2.3 |
| 153 |
.\} |
| 154 |
|
| 155 |
\fIslope\fR |
| 156 |
and |
| 157 |
\fIintercept\fR |
| 158 |
are double\-precision floating point values which indicate the audio data sample slope and zero\-crossing value, respectively, for the given sample format\&. |
| 159 |
.RE |
| 160 |
.sp |
| 161 |
.RS 4 |
| 162 |
.ie n \{\ |
| 163 |
\h'-04'\(bu\h'+03'\c |
| 164 |
.\} |
| 165 |
.el \{\ |
| 166 |
.sp -1 |
| 167 |
.IP \(bu 2.3 |
| 168 |
.\} |
| 169 |
|
| 170 |
\fIminclip\fR |
| 171 |
and |
| 172 |
\fImaxclip\fR |
| 173 |
are double\-precision floating point values which indicates the minimum or maximum sample values to be returned\&. Any values less than |
| 174 |
\fIminclip\fR |
| 175 |
will be set to |
| 176 |
\fIminclip\fR, and any values greater than |
| 177 |
\fImaxclip\fR |
| 178 |
will be set to |
| 179 |
\fImaxclip\fR\&. |
| 180 |
.RE |
| 181 |
.SH "RETURN VALUE" |
| 182 |
.sp |
| 183 |
These functions return 0 for success and \-1 for failure\&. |
| 184 |
.SH "AUTHOR" |
| 185 |
.sp |
| 186 |
Michael Pruett <michael@68k\&.org> |