[issue32004] Allow specifying code packing order in audioop adpcm functions

2017-12-13 Thread MosesofEgypt

MosesofEgypt <mosesbobadi...@gmail.com> added the comment:

Added serhiy.storchaka to nosy list as the issue has been open for over a month 
without response(not sure if I should have done this in the first place).

--
nosy: +serhiy.storchaka
versions: +Python 2.7

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32004>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32004] Allow specifying code packing order in audioop adpcm functions

2017-11-18 Thread MosesofEgypt

MosesofEgypt <mosesbobadi...@gmail.com> added the comment:

Changed type to behavior as this is more of a bug fix than an enhancement.

--
type: enhancement -> behavior

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32004>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32004] Allow specifying code packing order in audioop adpcm functions

2017-11-10 Thread MosesofEgypt

New submission from MosesofEgypt <mosesbobadi...@gmail.com>:

--- Issue ---
audioop.adpcm2lin and audioop.lin2adpcm currently treat the high 4 bits of each 
byte as the first code and the low 4 as the second code. In practice this is 
often the opposite.
http://www.drdobbs.com/database/algorithm-alley/184410326
https://wiki.multimedia.cx/index.php/Microsoft_IMA_ADPCM

--- Steps to reproduce ---
Run the attached script to decompress the attached wav to two different 16bit 
signed pcm wav files. The "GOOD" one had the nibbles of each code swapped 
before being decoded, while the "BAD" one didnt.

--- Suggested fix ---
I propose an additional optional boolean parameter to these functions to 
specify which nibble is the first code and which is the second.

NOTE: I haven't compiled my changes to test as I do not know how to set up a 
cpython build environment. This commit is more intended to show how to 
implement the fix.
https://github.com/MosesofEgypt/cpython/commit/4a5ca65833ec79857f065546ae0d90661ce26f5f

--
files: adpcm_test.zip
messages: 306063
nosy: MosesofEgypt
priority: normal
severity: normal
status: open
title: Allow specifying code packing order in audioop adpcm functions
type: enhancement
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file47258/adpcm_test.zip

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32004>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com