Issue 13681: Aifc read compressed frames fix (original) (raw)

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:25 admin set github: 57890
2022-03-13 17:49:05 iritkatriel set status: open -> closednosy: + iritkatrielmessages: + resolution: wont fixstage: resolved
2019-03-16 00:03:17 BreamoreBoy set nosy: - BreamoreBoy
2014-06-28 14:22:54 BreamoreBoy set nosy: + BreamoreBoymessages: +
2012-01-17 16:22:32 pitrou set dependencies: + Audioop decompression frames size check fix
2012-01-17 15:29:34 Oleg.Plakhotnyuk set files: + aifc_compression.patchmessages: +
2012-01-17 15:23:59 Oleg.Plakhotnyuk set files: - aifc_compression.patch
2012-01-11 22:01:02 sandro.tosi set nosy: + sandro.tosimessages: +
2011-12-30 11:22:23 Oleg.Plakhotnyuk set messages: +
2011-12-30 11:17:09 Oleg.Plakhotnyuk create