[issue16461] wave module: wrong integer format

2012-11-16 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Thanks to Christian for the report and to Terry for digging the spec. Patched. Thanks. -- ___ Python tracker ___ _

[issue16461] wave module: wrong integer format

2012-11-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset b8ece33ce27d by Jesus Cea in branch '2.7': Closes #16461: Wave library should be able to deal with 4GB wav files, and sample rate of 44100 Hz. http://hg.python.org/cpython/rev/b8ece33ce27d New changeset 542bf1c1f2e3 by Jesus Cea in branch '3.2': Cl

[issue16461] wave module: wrong integer format

2012-11-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: The Wikipedia sentence "The WAV format is limited to files that are less than 4 GB, because of its use of a 32-bit unsigned integer to record the file size header" is unambiguous and appears correct (see below). The rest of the Wikipedia sentence "(some progra

[issue16461] wave module: wrong integer format

2012-11-12 Thread Christian Kern
Christian Kern added the comment: Addendum: 4 Gib file size can only be achieved with "unsigned long". Moreover, for numbers < 2^31, "signed long" and "unsigned long" seem to be the same, so there should arise no problem. (Tested on x86_64 linux) BTW: Writing .wav files could gain performance it

[issue16461] wave module: wrong integer format

2012-11-12 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Python 3.x affected too. Python 2.6 is open only for security fixes. 4GB support confirmed: https://en.wikipedia.org/wiki/WAV#Limitations But trying to find a "canonical" description of the format, I see tons of inconsistencies. For instance http://web.arch

[issue16461] wave module: wrong integer format

2012-11-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Library (Lib) -Extension Modules stage: -> needs patch versions: +Python 3.2, Python 3.3, Python 3.4 -Python 2.6 ___ Python tracker ___

[issue16461] wave module: wrong integer format

2012-11-12 Thread Christian Kern
New submission from Christian Kern: Writing .wav files is limited to a file size of 2 Gib, while the WAV file format itself supports up to 4 Gib. Trying to write a file beyond 2 Gib (e.g. 203 minutes at CD quality (i.e. 44.1 kHz, 2 channels, 16 bit)) will crash at the moment when self._datawritte