Author serhiy.storchaka
Recipients serhiy.storchaka
Date 2013-11-18.10:25:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384770307.37.0.611849831444.issue19641@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-11-18 10:25:09serhiy.storchakasetrecipients: + serhiy.storchaka
2013-11-18 10:25:07serhiy.storchakasetmessageid: <1384770307.37.0.611849831444.issue19641@psf.upfronthosting.co.za>
2013-11-18 10:25:07serhiy.storchakalinkissue19641 messages
2013-11-18 10:25:07serhiy.storchakacreate