File: afSetVirtualByteOrder.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 (186 lines) | stat: -rw-r--r-- 4,026 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
'\" t
.\"     Title: afSetVirtualSampleFormat
.\"    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 "AFSETVIRTUALSAMPLEFO" "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"
afSetVirtualByteOrder, afSetVirtualChannels, afSetVirtualPCMMapping, afSetVirtualSampleFormat \- set the virtual data format for a track in an audio file
.SH "SYNOPSIS"
.sp
.nf
#include <audiofile\&.h>
.fi
.sp
.nf
int afSetVirtualByteOrder (AFfilehandle file, int track, int byteOrder);
.fi
.sp
.nf
int afSetVirtualChannels (AFfilehandle file, int track, int channels);
.fi
.sp
.nf
int afSetVirtualSampleFormat (AFfilehandle file, int track,
    int sampleFormat, int sampleWidth);
.fi
.sp
.nf
int afSetVirtualPCMMapping (AFfilehandle file, int track,
    double slope, double intercept, double minclip, double maxclip);
.fi
.SH "PARAMETERS"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIfile\fR
is an AFfilehandle which refers to an open audio file and is usually created by afOpenFile\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fItrack\fR
is an integer which identifies a particular track in an open audio file\&. The only valid track is
AF_DEFAULT_TRACK
for all currently supported file formats\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIsampleFormat\fR
is an integer which denotes a virtual sample format\&. Valid values are
AF_SAMPFMT_TWOSCOMP,
AF_SAMPFMT_UNSIGNED,
AF_SAMPFMT_FLOAT, and
AF_SAMPFMT_DOUBLE\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIsampleWidth\fR
is a positive integer which specifies the number of bits in a sample\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIchannels\fR
is a positive integer which specifies the number of interleaved audio channels in the given audio track\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIbyteOrder\fR
is an integer which specifies the virtual byte order of samples in the given audio track\&.
\fIbyteOrder\fR
can be either
AF_BYTEORDER_BIGENDIAN
or
AF_BYTEORDER_LITTLEENDIAN\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIslope\fR
and
\fIintercept\fR
are double\-precision floating point values which indicate the audio data sample slope and zero\-crossing value, respectively, for the given sample format\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIminclip\fR
and
\fImaxclip\fR
are double\-precision floating point values which indicates the minimum or maximum sample values to be returned\&. Any values less than
\fIminclip\fR
will be set to
\fIminclip\fR, and any values greater than
\fImaxclip\fR
will be set to
\fImaxclip\fR\&.
.RE
.SH "RETURN VALUE"
.sp
These functions return 0 for success and \-1 for failure\&.
.SH "AUTHOR"
.sp
Michael Pruett <michael@68k\&.org>