[issue11126] Wave.py does not always write proper length in header

2013-09-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> invalid stage: -> committed/rejected status: pending -> closed ___ Python tracker ___ __

[issue11126] Wave.py does not always write proper length in header

2013-08-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue11126] Wave.py does not always write proper length in header

2013-06-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't see anything wrong in current code. In first alternation data is an array of sampwidth-sized items and the number of written bytes is len(data) * self._sampwidth. In second alternation data is raw bytes object and the number of written bytes is just

[issue11126] Wave.py does not always write proper length in header

2013-06-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue11126] Wave.py does not always write proper length in header

2013-06-29 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list m

[issue11126] Wave.py does not always write proper length in header

2011-02-12 Thread jtidman
jtidman added the comment: Yep, your solution is better. I can provide some text files (lists of numbers) and two programs, wave2text.py and text2wav.py. These are the programs I wrote that found this issue in the first place. Add a few checks and you could run text2wave.py and then wave2t

[issue11126] Wave.py does not always write proper length in header

2011-02-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that the _sampwidth multiplier is needed regardless of endianness. The simplest option would be to pull the _datawritten statement out of the alternation, making the code read if self._sampwidth > 1 and big_endian: import array

[issue11126] Wave.py does not always write proper length in header

2011-02-04 Thread jtidman
New submission from jtidman : wave.py does not always honor the sampwidth setting, especially on little endian machines. If sampwidth is not one and big_endian is not set, then datawritten will not be muliplied by sampwidth, causing the header to be incorrect, and the file to appear to contai