[docs] audioop module documentation bug
Kalle Karjalainen
kalle at me.com
Mon Jun 21 21:50:32 CEST 2010
Hello,
I found a bug in http://docs.python.org/library/audioop.html
In the example method, def mul_stereo(sample, width, lfactor, rfactor), the result of its first two lines:
lsample = audioop.tomono(sample, width, 1, 0)
rsample = audioop.tomono(sample, width, 0, 1)
... is discarded by the following two lines:
lsample = audioop.mul(sample, width, lfactor)
rsample = audioop.mul(sample, width, rfactor)
... resulting in a sample twice as long being returned as is intended, i.e. "slowing down” of the audio.
The fix for the third and fourth lines is:
lsample = audioop.mul(lsample, width, lfactor)
rsample = audioop.mul(rsample, width, rfactor)
Best,
Kalle Karjalainen
More information about the docs
mailing list