summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libaudioop.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1998-02-13 06:58:54 (GMT)
committerFred Drake <fdrake@acm.org>1998-02-13 06:58:54 (GMT)
commit1947991c2f85db781fb3fcdc9e3bcfe2905e58e2 (patch)
tree260789493c7151408f009eaa84a7815ce4d28246 /Doc/lib/libaudioop.tex
parentdc8af0acc1fbeec89e43f1ea43bf1a4d016f4fc6 (diff)
downloadcpython-1947991c2f85db781fb3fcdc9e3bcfe2905e58e2.zip
cpython-1947991c2f85db781fb3fcdc9e3bcfe2905e58e2.tar.gz
cpython-1947991c2f85db781fb3fcdc9e3bcfe2905e58e2.tar.bz2
Remove all \bcode / \ecode cruft; this is no longer needed. See previous
checkin of myformat.sty. Change "\renewcommand{\indexsubitem}{(...)}" to "\setindexsubitem{(...)}" everywhere. Some other minor nits that I happened to come across.
Diffstat (limited to 'Doc/lib/libaudioop.tex')
-rw-r--r--Doc/lib/libaudioop.tex10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/lib/libaudioop.tex b/Doc/lib/libaudioop.tex
index b700155..69a3a83 100644
--- a/Doc/lib/libaudioop.tex
+++ b/Doc/lib/libaudioop.tex
@@ -13,7 +13,7 @@ otherwise the sample size (in bytes) is always a parameter of the operation.
The module defines the following variables and functions:
-\renewcommand{\indexsubitem}{(in module audioop)}
+\setindexsubitem{(in module audioop)}
\begin{excdesc}{error}
This exception is raised on all errors, such as unknown number of bytes
per sample, etc.
@@ -201,7 +201,7 @@ distinction between mono and stereo fragments, i.e.\ all samples are
treated equal. If this is a problem the stereo fragment should be split
into two mono fragments first and recombined later. Here is an example
of how to do that:
-\bcode\begin{verbatim}
+\begin{verbatim}
def mul_stereo(sample, width, lfactor, rfactor):
lsample = audioop.tomono(sample, width, 1, 0)
rsample = audioop.tomono(sample, width, 0, 1)
@@ -210,7 +210,7 @@ def mul_stereo(sample, width, lfactor, rfactor):
lsample = audioop.tostereo(lsample, width, 1, 0)
rsample = audioop.tostereo(rsample, width, 0, 1)
return audioop.add(lsample, rsample, width)
-\end{verbatim}\ecode
+\end{verbatim}
%
If you use the ADPCM coder to build network packets and you want your
protocol to be stateless (i.e.\ to be able to tolerate packet loss)
@@ -231,7 +231,7 @@ They are primarily meant to do echo cancellation. A reasonably
fast way to do this is to pick the most energetic piece of the output
sample, locate that in the input sample and subtract the whole output
sample from the input sample:
-\bcode\begin{verbatim}
+\begin{verbatim}
def echocancel(outputdata, inputdata):
pos = audioop.findmax(outputdata, 800) # one tenth second
out_test = outputdata[pos*2:]
@@ -244,4 +244,4 @@ def echocancel(outputdata, inputdata):
postfill = '\0'*(len(inputdata)-len(prefill)-len(outputdata))
outputdata = prefill + audioop.mul(outputdata,2,-factor) + postfill
return audioop.add(inputdata, outputdata, 2)
-\end{verbatim}\ecode
+\end{verbatim}