diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/audioop.rst | 8 | ||||
-rw-r--r-- | Doc/whatsnew/3.4.rst | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Doc/library/audioop.rst b/Doc/library/audioop.rst index ca6cfb3..fbb7fc6 100644 --- a/Doc/library/audioop.rst +++ b/Doc/library/audioop.rst @@ -77,6 +77,14 @@ The module defines the following variables and functions: sample. Samples wrap around in case of overflow. +.. function:: byteswap(fragment, width) + + "Byteswap" all samples in a fragment and returns the modified fragment. + Converts big-endian samples to little-endian and vice versa. + + .. versionadded: 3.4 + + .. function:: cross(fragment, width) Return the number of zero crossings in the fragment passed as an argument. diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index 6f949a9..31f7cbd 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -415,6 +415,9 @@ audioop Added support for 24-bit samples (:issue:`12866`). +Added the :func:`~audioop.byteswap` function to convert big-endian samples +to little-endian and vice versa (:issue:`19641`). + base64 ------ |