Debian Codegraph @

docs/afInitSampleFormat.3

raw
1 '\" t
2 .\" Title: afInitSampleFormat
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 "AFINITSAMPLEFORMAT" "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 afInitSampleFormat, afInitByteOrder, afInitChannels, afInitRate \- initialize audio data format for a track in an audio file setup
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 #include <audiofile\&.h>
36 .fi
37 .sp
38 .nf
39 void afInitSampleFormat(AFfilesetup setup, int track, int sampleFormat,
40 int sampleWidth);
41 void afInitByteOrder(AFfilesetup setup, int track, int byteOrder);
42 void afInitChannels(AFfilesetup setup, int track, int channels);
43 void afInitRate(AFfilesetup setup, int track, double rate);
44 .fi
45 .SH "PARAMETERS"
46 .sp
47 setup is a valid file setup returned by \fBafNewFileSetup\fR(3)\&.
48 .sp
49 track specifies a track within the audio file setup\&. track is always AF_DEFAULT_TRACK for all currently supported file formats\&.
50 .sp
51 sampleFormat is a symbolic constant specifying the sample format for the audio data in the track\&. sampleFormat must be one of AF_SAMPFMT_TWOSCOMP, AF_SAMPFMT_UNSIGNED, AF_SAMPFMT_FLOAT, or AF_SAMPFMT_DOUBLE\&.
52 .sp
53 sampleWidth is a positive integer specifying the number of bits for each sample in the track\&.
54 .sp
55 byteOrder is a symbolic constant specifying the byte order of the track\&. byteOrder must be one of AF_BYTEORDER_BIGENDIAN or AF_BYTEORDER_LITTLEENDIAN\&.
56 .sp
57 channels is a positive integer specifying the number of channels in the track\&.
58 .sp
59 rate is a positive double\-precision floating\-point number specifying the sample rate of the track\&.
60 .SH "DESCRIPTION"
61 .sp
62 afInitSampleFormat initializes the track to the specified sample format and sample width\&.
63 .sp
64 afInitByteOrder initializes the track to the specified byte order\&.
65 .sp
66 afInitChannels initializes the track to the specified number of channels\&.
67 .sp
68 afInitRate initializes the track to the specified sample rate\&.
69 .SH "ERRORS"
70 .sp
71 afInitSampleFormat, afInitByteOrder, afInitChannels, and afInitRate can produce the following errors:
72 .TS
73 tab(:);
74 lt lt
75 lt lt.
76 T{
77 .sp
78 AF_BAD_FILESETUP
79 T}:T{
80 .sp
81 setup represents an invalid file setup\&.
82 T}
83 T{
84 .sp
85 AF_BAD_TRACK
86 T}:T{
87 .sp
88 track represents an invalid track identifier\&.
89 T}
90 .TE
91 .sp 1
92 .sp
93 afInitSampleFormat can also produce the following errors:
94 .TS
95 tab(:);
96 lt lt
97 lt lt.
98 T{
99 .sp
100 AF_BAD_SAMPFMT
101 T}:T{
102 .sp
103 sampleFormat does not represent a valid sample format\&.
104 T}
105 T{
106 .sp
107 AF_BAD_WIDTH
108 T}:T{
109 .sp
110 sampleWidth is not a valid sample width\&.
111 T}
112 .TE
113 .sp 1
114 .sp
115 afInitByteOrder can also produce the following error:
116 .TS
117 tab(:);
118 lt lt.
119 T{
120 .sp
121 AF_BAD_BYTEORDER
122 T}:T{
123 .sp
124 byteOrder does not represent a valid byte order\&.
125 T}
126 .TE
127 .sp 1
128 .sp
129 afInitChannels can also produce the following error:
130 .TS
131 tab(:);
132 lt lt.
133 T{
134 .sp
135 AF_BAD_CHANNELS
136 T}:T{
137 .sp
138 channels specifies an invalid number of channels\&.
139 T}
140 .TE
141 .sp 1
142 .sp
143 afInitRate can also produce the following error:
144 .TS
145 tab(:);
146 lt lt.
147 T{
148 .sp
149 AF_BAD_RATE
150 T}:T{
151 .sp
152 rate specifies an invalid sample rate\&.
153 T}
154 .TE
155 .sp 1
156 .SH "SEE ALSO"
157 .sp
158 \fBafNewFileSetup\fR(3), \fBafInitFileFormat\fR(3), \fBafInitCompression\fR(3), \fBafOpenFile\fR(3)
159 .SH "AUTHOR"
160 .sp
161 Michael Pruett <michael@68k\&.org>