@@ -13,7 +13,7 @@ \section{Built-in Module \sectcode{audioop}}
1313
1414The module defines the following variables and functions:
1515
16- \renewcommand { \indexsubitem } {(in module audioop)}
16+ \setindexsubitem {(in module audioop)}
1717\begin {excdesc }{error}
1818This exception is raised on all errors, such as unknown number of bytes
1919per sample, etc.
@@ -201,7 +201,7 @@ \section{Built-in Module \sectcode{audioop}}
201201treated equal. If this is a problem the stereo fragment should be split
202202into two mono fragments first and recombined later. Here is an example
203203of how to do that:
204- \bcode \ begin {verbatim }
204+ \begin {verbatim }
205205def mul_stereo(sample, width, lfactor, rfactor):
206206 lsample = audioop.tomono(sample, width, 1, 0)
207207 rsample = audioop.tomono(sample, width, 0, 1)
@@ -210,7 +210,7 @@ \section{Built-in Module \sectcode{audioop}}
210210 lsample = audioop.tostereo(lsample, width, 1, 0)
211211 rsample = audioop.tostereo(rsample, width, 0, 1)
212212 return audioop.add(lsample, rsample, width)
213- \end {verbatim }\ecode
213+ \end {verbatim }
214214%
215215If you use the ADPCM coder to build network packets and you want your
216216protocol to be stateless (i.e.\ to be able to tolerate packet loss)
@@ -231,7 +231,7 @@ \section{Built-in Module \sectcode{audioop}}
231231fast way to do this is to pick the most energetic piece of the output
232232sample, locate that in the input sample and subtract the whole output
233233sample from the input sample:
234- \bcode \ begin {verbatim }
234+ \begin {verbatim }
235235def echocancel(outputdata, inputdata):
236236 pos = audioop.findmax(outputdata, 800) # one tenth second
237237 out_test = outputdata[pos*2:]
@@ -244,4 +244,4 @@ \section{Built-in Module \sectcode{audioop}}
244244 postfill = '\0'*(len(inputdata)-len(prefill)-len(outputdata))
245245 outputdata = prefill + audioop.mul(outputdata,2,-factor) + postfill
246246 return audioop.add(inputdata, outputdata, 2)
247- \end {verbatim }\ecode
247+ \end {verbatim }
0 commit comments