Re: [Python-Dev] Expanding max chunk size to 4GB.

2005-07-06 Thread Erik de Castro Lopo
Mark Rages wrote: > This site says it's a "long": http://www.borg.com/~jglatt/tech/wave.htm > This site says it's a "ulong": http://www.borg.com/~jglatt/tech/aboutiff.htm Wonderful isn't it :-). > Unsigned makes more sense, considering it's a byte count and would > never be negative. > > I've C

Re: [Python-Dev] Expanding max chunk size to 4GB.

2005-07-06 Thread Erik de Castro Lopo
Guido van Rossum wrote: > Looks ok to me, but have you tested this with other software that > reads/writes wave files? Have a look at the sndfile-info program that is distributed as part of libnsdifle. If there is anything wrong with the file you have generated, the output of that program will ma

Re: [Python-Dev] Expanding max chunk size to 4GB.

2005-07-06 Thread Erik de Castro Lopo
Mark Rages wrote: > The RIFF chunk size (used by the Python wave library) is 2GB, because > the length is read as a signed 32-bit integer. > > The attached patch to chunk.py raises the limit to 4GB by using a > signed integer. > > Is this correct? The original Microsoft specification listed the

Re: [Python-Dev] Expanding max chunk size to 4GB.

2005-07-06 Thread Mark Rages
On 7/6/05, Guido van Rossum <[EMAIL PROTECTED]> wrote: > Looks ok to me, but have you tested this with other software that > reads/writes wave files? It appears to work, but I haven't done enough testing to be confident. > You seem to be speculating about the format where you should be > reading

Re: [Python-Dev] Expanding max chunk size to 4GB.

2005-07-06 Thread Guido van Rossum
Looks ok to me, but have you tested this with other software that reads/writes wave files? You seem to be speculating about the format where you should be reading the reference documentation for this file format (alas, I can't help you find it -- you can Google for it as well as I can :). Also, p

[Python-Dev] Expanding max chunk size to 4GB.

2005-07-06 Thread Mark Rages
The RIFF chunk size (used by the Python wave library) is 2GB, because the length is read as a signed 32-bit integer. The attached patch to chunk.py raises the limit to 4GB by using a signed integer. Is this correct? Is there a more general solution to 32-bit addressing limitation in wave files?