Changeset 391 for python/trunk/Doc/library/audioop.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/library/audioop.rst
r2 r391 39 39 Return a fragment which is the addition of the two samples passed as parameters. 40 40 *width* is the sample width in bytes, either ``1``, ``2`` or ``4``. Both 41 fragments should have the same length. 41 fragments should have the same length. Samples are truncated in case of overflow. 42 42 43 43 … … 72 72 73 73 Return a fragment that is the original fragment with a bias added to each 74 sample. 74 sample. Samples wrap around in case of overflow. 75 75 76 76 … … 163 163 164 164 165 .. function:: max(fragment, width) 166 167 Return the maximum of the *absolute value* of all samples in a fragment. 168 169 170 .. function:: maxpp(fragment, width) 171 172 Return the maximum peak-peak value in the sound fragment. 173 174 165 175 .. function:: minmax(fragment, width) 166 176 … … 169 179 170 180 171 .. function:: max(fragment, width)172 173 Return the maximum of the *absolute value* of all samples in a fragment.174 175 176 .. function:: maxpp(fragment, width)177 178 Return the maximum peak-peak value in the sound fragment.179 180 181 181 .. function:: mul(fragment, width, factor) 182 182 183 183 Return a fragment that has all samples in the original fragment multiplied by 184 the floating-point value *factor*. Overflow is silently ignored.184 the floating-point value *factor*. Samples are truncated in case of overflow. 185 185 186 186 … … 237 237 lsample = audioop.tomono(sample, width, 1, 0) 238 238 rsample = audioop.tomono(sample, width, 0, 1) 239 lsample = audioop.mul( sample, width, lfactor)240 rsample = audioop.mul( sample, width, rfactor)239 lsample = audioop.mul(lsample, width, lfactor) 240 rsample = audioop.mul(rsample, width, rfactor) 241 241 lsample = audioop.tostereo(lsample, width, 1, 0) 242 242 rsample = audioop.tostereo(rsample, width, 0, 1) … … 248 248 state (the one you passed to :func:`lin2adpcm`) along to the decoder, not the 249 249 final state (as returned by the coder). If you want to use 250 : func:`struct.struct` to store the state in binary you can code the first250 :class:`struct.Struct` to store the state in binary you can code the first 251 251 element (the predicted value) in 16 bits and the second (the delta index) in 8. 252 252
Note:
See TracChangeset
for help on using the changeset viewer.