Message79586
Corrected code in writeframesraw():
self._datawritten = self._datawritten + len(data) *
self._sampwidth
else:
self._file.write(data)
self._datawritten = self._datawritten + len(data) *
self._sampwidth
Note that the default (not byte swapped) assignment to _datawritten must
also be multiplied by _sampwidth. If not, audio programs will ignore the
second half of a 16-bit-sample file.
As a side note, the calls to _patchheader() do not need to be protected
by this "if" statement:
if self._datalength != self._datawritten:
_patchheader does the same test to optimize its operation. |
|
Date |
User |
Action |
Args |
2009-01-11 02:16:43 | alex_python_org | set | recipients:
+ alex_python_org |
2009-01-11 02:16:43 | alex_python_org | set | messageid: <1231640203.22.0.836631115229.issue4913@psf.upfronthosting.co.za> |
2009-01-11 02:16:42 | alex_python_org | link | issue4913 messages |
2009-01-11 02:16:41 | alex_python_org | create | |
|