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 <rep...@bugs.python.org>
<http://bugs.python.org/issue19641>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to