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 chunk size fields
as unsigned 32 bit int, so what you are doing is correct.

However, be aware that many programs (particularly on windows) using
their own WAV file parsing code do not handle file bigger than 2Gig.

> Is there a more general solution to 32-bit addressing limitation in
> wave files? 

No.

> Multiple chunks?

No.

Other file formats allow file sizes larger than 4Gig. I would suggest
you have a look at AU and W64.

Erik
-- 
+-----------+
  Erik de Castro Lopo  [EMAIL PROTECTED] (Yes it's valid)
+---+
Fundamentalist : Someone who is colour blind and yet wants everyone
else to see the world with the same lack of colour.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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 make it pretty
obvious.

Erik
-- 
+---+
  Erik de Castro Lopo  [EMAIL PROTECTED] (Yes it's valid)
+---+
"Neither noise nor information is predictable."
  -- Ray Kurzweil
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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 CC'd Erik de Castro Lopo, whose word is more definitive than
> random websites.

libsndfile treats the chunk lengths as unsigned int.

Erik
-- 
+---+
  Erik de Castro Lopo  [EMAIL PROTECTED] (Yes it's valid)
+---+
"It's far too easy to make fun of Microsoft products, but it takes a
real man to make them work, and a god to make them do anything useful"
  -- Anonymous
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com