Commit eca576c6 authored by Guido van Rossum's avatar Guido van Rossum

Fix by Jean-Claude Rimbault [ Bug #116271 ] -- the WAVE header was

never written properly because the '4' length indicators for the 's'
format characters were missing.
parent ebe73025
......@@ -439,7 +439,7 @@ class Wave_write:
self._nframes = initlength / (self._nchannels * self._sampwidth)
self._datalength = self._nframes * self._nchannels * self._sampwidth
self._form_length_pos = self._file.tell()
self._file.write(struct.pack('<lsslhhllhhs',
self._file.write(struct.pack('<l4s4slhhllhh4s',
36 + self._datalength, 'WAVE', 'fmt ', 16,
WAVE_FORMAT_PCM, self._nchannels, self._framerate,
self._nchannels * self._framerate * self._sampwidth,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment