[New-bugs-announce] [issue19641] Add audioop.byteswap()

Serhiy Storchaka report at bugs.python.org
Mon Nov 18 11:25:07 CET 2013


New submission from Serhiy Storchaka:

The audio modules often need convert between little endian and big endian data. The array module can be used to byteswap 16- and 32-bit samples, but it can't help with 24-bit samples. Python implemented function for swapping bytes is not very efficient. In any case the use of array is not so simple (see issue19276, issue19633).

The proposed patch adds efficient byteswap() function in the audioop module. byteswap(fragment, width) byteswaps every "width"-byte sample in the fragment and returns modified data.

----------
components: Library (Lib)
files: audioop_byteswap.patch
keywords: patch
messages: 203273
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Add audioop.byteswap()
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32686/audioop_byteswap.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19641>
_______________________________________


More information about the New-bugs-announce mailing list