@@ -19,46 +19,46 @@ \section{Built-in Module \sectcode{audioop}}
1919per sample, etc.
2020\end {excdesc }
2121
22- \begin {funcdesc }{add}{fragment1\ , fragment2\ , width}
22+ \begin {funcdesc }{add}{fragment1, fragment2, width}
2323Return a fragment which is the addition of the two samples passed as
2424parameters. \var {width} is the sample width in bytes, either
2525\code {1}, \code {2} or \code {4}. Both fragments should have the same
2626length.
2727\end {funcdesc }
2828
29- \begin {funcdesc }{adpcm2lin}{adpcmfragment\ , width\ , state}
29+ \begin {funcdesc }{adpcm2lin}{adpcmfragment, width, state}
3030Decode an Intel/DVI ADPCM coded fragment to a linear fragment. See
3131the description of \code {lin2adpcm} for details on ADPCM coding.
3232Return a tuple \code {(\var {sample}, \var {newstate})} where the sample
3333has the width specified in \var {width}.
3434\end {funcdesc }
3535
36- \begin {funcdesc }{adpcm32lin}{adpcmfragment\ , width\ , state}
36+ \begin {funcdesc }{adpcm32lin}{adpcmfragment, width, state}
3737Decode an alternative 3-bit ADPCM code. See \code {lin2adpcm3} for
3838details.
3939\end {funcdesc }
4040
41- \begin {funcdesc }{avg}{fragment\ , width}
41+ \begin {funcdesc }{avg}{fragment, width}
4242Return the average over all samples in the fragment.
4343\end {funcdesc }
4444
45- \begin {funcdesc }{avgpp}{fragment\ , width}
45+ \begin {funcdesc }{avgpp}{fragment, width}
4646Return the average peak-peak value over all samples in the fragment.
4747No filtering is done, so the usefulness of this routine is
4848questionable.
4949\end {funcdesc }
5050
51- \begin {funcdesc }{bias}{fragment\ , width\ , bias}
51+ \begin {funcdesc }{bias}{fragment, width, bias}
5252Return a fragment that is the original fragment with a bias added to
5353each sample.
5454\end {funcdesc }
5555
56- \begin {funcdesc }{cross}{fragment\ , width}
56+ \begin {funcdesc }{cross}{fragment, width}
5757Return the number of zero crossings in the fragment passed as an
5858argument.
5959\end {funcdesc }
6060
61- \begin {funcdesc }{findfactor}{fragment\ , reference}
61+ \begin {funcdesc }{findfactor}{fragment, reference}
6262Return a factor \var {F} such that
6363\code {rms(add(fragment, mul(reference, -F)))} is minimal, i.e.,
6464return the factor with which you should multiply \var {reference} to
@@ -68,7 +68,7 @@ \section{Built-in Module \sectcode{audioop}}
6868The time taken by this routine is proportional to \code {len(fragment)}.
6969\end {funcdesc }
7070
71- \begin {funcdesc }{findfit}{fragment\ , reference}
71+ \begin {funcdesc }{findfit}{fragment, reference}
7272This routine (which only accepts 2-byte sample fragments)
7373
7474Try to match \var {reference} as well as possible to a portion of
@@ -82,7 +82,7 @@ \section{Built-in Module \sectcode{audioop}}
8282\code {findfactor}.
8383\end {funcdesc }
8484
85- \begin {funcdesc }{findmax}{fragment\ , length}
85+ \begin {funcdesc }{findmax}{fragment, length}
8686Search \var {fragment} for a slice of length \var {length} samples (not
8787bytes!)\ with maximum energy, i.e., return \var {i} for which
8888\code {rms(fragment[i*2:(i+length)*2])} is maximal. The fragments
@@ -91,15 +91,15 @@ \section{Built-in Module \sectcode{audioop}}
9191The routine takes time proportional to \code {len(fragment)}.
9292\end {funcdesc }
9393
94- \begin {funcdesc }{getsample}{fragment\ , width\ , index}
94+ \begin {funcdesc }{getsample}{fragment, width, index}
9595Return the value of sample \var {index} from the fragment.
9696\end {funcdesc }
9797
98- \begin {funcdesc }{lin2lin}{fragment\ , width\ , newwidth}
98+ \begin {funcdesc }{lin2lin}{fragment, width, newwidth}
9999Convert samples between 1-, 2- and 4-byte formats.
100100\end {funcdesc }
101101
102- \begin {funcdesc }{lin2adpcm}{fragment\ , width\ , state}
102+ \begin {funcdesc }{lin2adpcm}{fragment, width, state}
103103Convert samples to 4 bit Intel/DVI ADPCM encoding. ADPCM coding is an
104104adaptive coding scheme, whereby each 4 bit number is the difference
105105between one sample and the next, divided by a (varying) step. The
@@ -113,41 +113,41 @@ \section{Built-in Module \sectcode{audioop}}
113113is the ADPCM coded fragment packed 2 4-bit values per byte.
114114\end {funcdesc }
115115
116- \begin {funcdesc }{lin2adpcm3}{fragment\ , width\ , state}
116+ \begin {funcdesc }{lin2adpcm3}{fragment, width, state}
117117This is an alternative ADPCM coder that uses only 3 bits per sample.
118118It is not compatible with the Intel/DVI ADPCM coder and its output is
119119not packed (due to laziness on the side of the author). Its use is
120120discouraged.
121121\end {funcdesc }
122122
123- \begin {funcdesc }{lin2ulaw}{fragment\ , width}
123+ \begin {funcdesc }{lin2ulaw}{fragment, width}
124124Convert samples in the audio fragment to U-LAW encoding and return
125125this as a Python string. U-LAW is an audio encoding format whereby
126126you get a dynamic range of about 14 bits using only 8 bit samples. It
127127is used by the Sun audio hardware, among others.
128128\end {funcdesc }
129129
130- \begin {funcdesc }{minmax}{fragment\ , width}
130+ \begin {funcdesc }{minmax}{fragment, width}
131131Return a tuple consisting of the minimum and maximum values of all
132132samples in the sound fragment.
133133\end {funcdesc }
134134
135- \begin {funcdesc }{max}{fragment\ , width}
135+ \begin {funcdesc }{max}{fragment, width}
136136Return the maximum of the \emph {absolute value } of all samples in a
137137fragment.
138138\end {funcdesc }
139139
140- \begin {funcdesc }{maxpp}{fragment\ , width}
140+ \begin {funcdesc }{maxpp}{fragment, width}
141141Return the maximum peak-peak value in the sound fragment.
142142\end {funcdesc }
143143
144- \begin {funcdesc }{mul}{fragment\ , width\ , factor}
144+ \begin {funcdesc }{mul}{fragment, width, factor}
145145Return a fragment that has all samples in the original framgent
146146multiplied by the floating-point value \var {factor}. Overflow is
147147silently ignored.
148148\end {funcdesc }
149149
150- \begin {funcdesc }{ratecv}{fragment\ , width\ , nchannels\ , inrate\ , outrate\ , state\optional {\ , weightA\ , weightB}}
150+ \begin {funcdesc }{ratecv}{fragment, width, nchannels, inrate, outrate, state\optional {, weightA, weightB}}
151151Convert the frame rate of the input fragment.
152152
153153\code {State} is a tuple containing the state of the converter. The
@@ -158,11 +158,11 @@ \section{Built-in Module \sectcode{audioop}}
158158simple digital filter and default to 1 and 0 respectively.
159159\end {funcdesc }
160160
161- \begin {funcdesc }{reverse}{fragment\ , width}
161+ \begin {funcdesc }{reverse}{fragment, width}
162162Reverse the samples in a fragment and returns the modified fragment.
163163\end {funcdesc }
164164
165- \begin {funcdesc }{rms}{fragment\ , width}
165+ \begin {funcdesc }{rms}{fragment, width}
166166Return the root-mean-square of the fragment, i.e.
167167\iftexi
168168the square root of the quotient of the sum of all squared sample value,
@@ -177,20 +177,20 @@ \section{Built-in Module \sectcode{audioop}}
177177This is a measure of the power in an audio signal.
178178\end {funcdesc }
179179
180- \begin {funcdesc }{tomono}{fragment\ , width\ , lfactor\ , rfactor}
180+ \begin {funcdesc }{tomono}{fragment, width, lfactor, rfactor}
181181Convert a stereo fragment to a mono fragment. The left channel is
182182multiplied by \var {lfactor} and the right channel by \var {rfactor}
183183before adding the two channels to give a mono signal.
184184\end {funcdesc }
185185
186- \begin {funcdesc }{tostereo}{fragment\ , width\ , lfactor\ , rfactor}
186+ \begin {funcdesc }{tostereo}{fragment, width, lfactor, rfactor}
187187Generate a stereo fragment from a mono fragment. Each pair of samples
188188in the stereo fragment are computed from the mono sample, whereby left
189189channel samples are multiplied by \var {lfactor} and right channel
190190samples by \var {rfactor}.
191191\end {funcdesc }
192192
193- \begin {funcdesc }{ulaw2lin}{fragment\ , width}
193+ \begin {funcdesc }{ulaw2lin}{fragment, width}
194194Convert sound fragments in ULAW encoding to linearly encoded sound
195195fragments. ULAW encoding always uses 8 bits samples, so \var {width}
196196refers only to the sample width of the output fragment here.
0 commit comments