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?  Multiple chunks?  Set the length field to zero and let
software assume we only have one chunk?

Regards,
Mark Rages
[EMAIL PROTECTED]
-- 
You think that it is a secret, but it never has been one.
  - fortune cookie
--- chunk.py    2005-07-06 11:39:07.179742573 -0500
+++ chunk.py.orig       2005-07-06 11:36:53.001585367 -0500
@@ -62,7 +62,7 @@
         if len(self.chunkname) < 4:
             raise EOFError
         try:
-            self.chunksize = struct.unpack(strflag+'L', file.read(4))[0]
+            self.chunksize = struct.unpack(strflag+'l', file.read(4))[0]
         except struct.error:
             raise EOFError
         if inclheader:
_______________________________________________
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

Reply via email to