Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/library/audioop.rst

    r2 r391  
    3939   Return a fragment which is the addition of the two samples passed as parameters.
    4040   *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.
    4242
    4343
     
    7272
    7373   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.
    7575
    7676
     
    163163
    164164
     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
    165175.. function:: minmax(fragment, width)
    166176
     
    169179
    170180
    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 
    181181.. function:: mul(fragment, width, factor)
    182182
    183183   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.
    185185
    186186
     
    237237       lsample = audioop.tomono(sample, width, 1, 0)
    238238       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)
    241241       lsample = audioop.tostereo(lsample, width, 1, 0)
    242242       rsample = audioop.tostereo(rsample, width, 0, 1)
     
    248248state (the one you passed to :func:`lin2adpcm`) along to the decoder, not the
    249249final 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 first
     250:class:`struct.Struct` to store the state in binary you can code the first
    251251element (the predicted value) in 16 bits and the second (the delta index) in 8.
    252252
Note: See TracChangeset for help on using the changeset viewer.