This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Aifc read compressed frames fix
Type: behavior Stage: resolved
Components: Library (Lib), Tests Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: wont fix
Dependencies: 13806 Superseder:
Assigned To: Nosy List: Oleg.Plakhotnyuk, ezio.melotti, iritkatriel, r.david.murray, sandro.tosi
Priority: normal Keywords: patch

Created on 2011-12-30 11:17 by Oleg.Plakhotnyuk, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
aifc_compression.patch Oleg.Plakhotnyuk, 2012-01-17 15:29 review
Messages (6)
msg150373 - (view) Author: Oleg Plakhotnyuk (Oleg.Plakhotnyuk) * Date: 2011-12-30 11:17
This patch resolves two issues:

1. ADPCM compressed audio files reading. Such files have frame size of 4 bits. Aifc lib cannot represent 4 bits frame size because it uses integer bytes count variable. I have replaced it with bits count.

2. ALAW/ULAW/ADPCM audio data decompression. According to documentation (http://docs.python.org/library/audioop.html), adpcm2lin, alaw2lin and ulaw2lin are using 'width' argument to represent output frames width. However, in audioop.c module there are checks that are raising exceptions if input frames length is not multiple of 'width'. I have replaced checking of 'len' to match 'size' with checking of 'len*size' to match 'size' in order to retain only basic length validity checks.
msg150374 - (view) Author: Oleg Plakhotnyuk (Oleg.Plakhotnyuk) * Date: 2011-12-30 11:22
I have put changes to both aifc and audioop module in this single patch. The reason is that aifc test reading compressed frames will work properly only after audioop fix has been applied.
msg151094 - (view) Author: Sandro Tosi (sandro.tosi) * (Python committer) Date: 2012-01-11 22:01
Hi Oleg,
thanks for your interest in aifc module!

I think that if the fix for audioop has a reason for itself to exists, then another issue (for that only) has to be filed and set the accordingly dependency on this one.
msg151460 - (view) Author: Oleg Plakhotnyuk (Oleg.Plakhotnyuk) * Date: 2012-01-17 15:29
Ok, I have opened issue 13806 with audioop fix alone. However, I cannot change current issue's dependencies to reflect that current issue depends on issue 13806. Could anyone do this for me please?
msg221794 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-28 14:22
@Oleg #13806 has been closed as fixed so can you take this issue forward?
msg415066 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-03-13 17:49
aifc is deprecated as per PEP 594, so there won't be further enhancements to it.
History
Date User Action Args
2022-04-11 14:57:25adminsetgithub: 57890
2022-03-13 17:49:05iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg415066

resolution: wont fix
stage: resolved
2019-03-16 00:03:17BreamoreBoysetnosy: - BreamoreBoy
2014-06-28 14:22:54BreamoreBoysetnosy: + BreamoreBoy
messages: + msg221794
2012-01-17 16:22:32pitrousetdependencies: + Audioop decompression frames size check fix
2012-01-17 15:29:34Oleg.Plakhotnyuksetfiles: + aifc_compression.patch

messages: + msg151460
2012-01-17 15:23:59Oleg.Plakhotnyuksetfiles: - aifc_compression.patch
2012-01-11 22:01:02sandro.tosisetnosy: + sandro.tosi
messages: + msg151094
2011-12-30 11:22:23Oleg.Plakhotnyuksetmessages: + msg150374
2011-12-30 11:17:09Oleg.Plakhotnyukcreate