msg143239 - (view) |
Author: Peder Jørgensen (Peder.Jørgensen) |
Date: 2011-08-30 22:51 |
Hi, I'm working with audio in python 2.7 and I needed Audioop to work with 24bit files, it currently only supports 8 16 and 32 bit sound files. (24bit files are very common in the audio world) My brother knows c quite well, so he managed to patch it up to support 24bit files for me, he's a bit too shy to try and get it into the standard python package him self, so I thought i'd give it a go for him :) I think the updated audioop.c would be a great add-on to python, it's 100% backwards compatible, and should work fine with python 3. I searched for hours and hours to see if someone had fixed it before, but found nothing. Not sure if this is the right place for this kind of thing, but was the best place I could find on python.org Also! The file i uploaded is not ready for release, my brother will probably want to go over it a few times and do more testing. |
|
|
msg143417 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-09-02 17:04 |
Welcome and thanks for your contribution! If I understand correctly, support for 24-bit files would be a new feature for audioop, so our development policy excludes 2.7, a stable release which only gets bug fixes. If you would like to turn your code into a patch (see guidelines in the devguide), it could be considered for inclusion in the next version. If you think your improvements would be useful for 2.7 users, you could rename your module to audioop2 and publish it on PyPI (pay attention to proper attribution and licensing). Feel free to ask any question! :) |
|
|
msg195471 - (view) |
Author: Ezio Melotti (ezio.melotti) *  |
Date: 2013-08-17 14:15 |
What's the status of this? |
|
|
msg197018 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-09-05 19:35 |
Unfortunately Peter's file is not ready for release. It adds support of 24-bit samples only to the part of functions, it works only on little-endian platform, it should crash on platforms which not allows non-aligned access, and I suspect it can overflow output buffers. And it doesn't provided in diff format. Here is other patch which adds support for 24-bit samples. It also cleanup and simplify the code of audioop.c so that its total size is even decreased. Patch includes test and documentation changes. |
|
|
msg199900 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-10-14 14:51 |
If there are no objections I will commit this. |
|
|
msg199906 - (view) |
Author: Peder Jørgensen (Peder.Jørgensen) |
Date: 2013-10-14 15:13 |
This is great! My brother did a few more updates to it and added support for endian conversion, and i've been using it a lot with out any problems, but i must admit your patch looks a lot cleaner Serhiy. Great work. Can't wait to test it. This is going to be of great use to everyone working with audio in python. |
|
|
msg200008 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-10-15 18:13 |
Updated patch addresses Antoine's comments. |
|
|
msg200462 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2013-10-19 18:11 |
New changeset e1fa70053828 by Serhiy Storchaka in branch 'default': Issue #12866: The audioop module now supports 24-bit samples. http://hg.python.org/cpython/rev/e1fa70053828 |
|
|
msg200467 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-10-19 18:18 |
Thank you for your review Antoine. |
|
|
msg200548 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2013-10-20 06:43 |
New changeset 97ad9af5d5e7 by Serhiy Storchaka in branch 'default': Issue #12866: Fix bias() for 24-bit. Add more tests. http://hg.python.org/cpython/rev/97ad9af5d5e7 |
|
|