# audioop - pydoc - phpman

Help on module audioop:

## NAME
    audioop

## MODULE REFERENCE
    <https://docs.python.org/3.10/library/audioop.html>

    The following documentation is automatically generated from the Python
    source files.  It may be incomplete, incorrect or include features that
    are considered implementation detail and may vary between Python
    implementations.  When in doubt, consult the module reference at the
    location listed above.

## CLASSES
    builtins.Exception(builtins.BaseException)
        error

### class error
     |  Method resolution order:
     |      error
     |      builtins.Exception
     |      builtins.BaseException
     |      builtins.object
     |
     |  Data descriptors defined here:
     |
     |  __weakref__
     |      list of weak references to the object (if defined)
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.Exception:
     |
     |  __init__(self, /, *args, **kwargs)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.Exception:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.BaseException:
     |
     |  __delattr__(self, name, /)
     |      Implement delattr(self, name).
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  __setattr__(self, name, value, /)
     |      Implement setattr(self, name, value).
     |
     |  __setstate__(...)
     |
     |  __str__(self, /)
     |      Return str(self).
     |
     |  with_traceback(...)
     |      Exception.with_traceback(tb) --
     |      set self.__traceback__ to tb and return self.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.BaseException:
     |
     |  __cause__
     |      exception cause
     |
     |  __context__
     |      exception context
     |
     |  __dict__
     |
     |  __suppress_context__
     |
     |  __traceback__
     |
     |  args

## FUNCTIONS
### add
        Return a fragment which is the addition of the two samples passed as parameters.

### adpcm2lin
        Decode an Intel/DVI ADPCM coded fragment to a linear fragment.

### alaw2lin
        Convert sound fragments in a-LAW encoding to linearly encoded sound fragments.

### avg
        Return the average over all samples in the fragment.

### avgpp
        Return the average peak-peak value over all samples in the fragment.

### bias
        Return a fragment that is the original fragment with a bias added to each sample.

### byteswap
        Convert big-endian samples to little-endian and vice versa.

### cross
        Return the number of zero crossings in the fragment passed as an argument.

### findfactor
        Return a factor F such that rms(add(fragment, mul(reference, -F))) is minimal.

### findfit
        Try to match reference as well as possible to a portion of fragment.

### findmax
        Search fragment for a slice of specified number of samples with maximum energy.

### getsample
        Return the value of sample index from the fragment.

### lin2adpcm
        Convert samples to 4 bit Intel/DVI ADPCM encoding.

### lin2alaw
        Convert samples in the audio fragment to a-LAW encoding.

### lin2lin
        Convert samples between 1-, 2-, 3- and 4-byte formats.

### lin2ulaw
        Convert samples in the audio fragment to u-LAW encoding.

### max
        Return the maximum of the absolute value of all samples in a fragment.

### maxpp
        Return the maximum peak-peak value in the sound fragment.

### minmax
        Return the minimum and maximum values of all samples in the sound fragment.

### mul
        Return a fragment that has all samples in the original fragment multiplied by the floating-point value factor.

### ratecv
        Convert the frame rate of the input fragment.

### reverse
        Reverse the samples in a fragment and returns the modified fragment.

### rms
        Return the root-mean-square of the fragment, i.e. sqrt(sum(S_i^2)/n).

### tomono
        Convert a stereo fragment to a mono fragment.

### tostereo
        Generate a stereo fragment from a mono fragment.

### ulaw2lin
        Convert sound fragments in u-LAW encoding to linearly encoded sound fragments.

## FILE
    /usr/lib/python3.10/lib-dynload/audioop.cpython-310-x86_64-linux-gnu.so


