This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alex_python_org
Recipients alex_python_org
Date 2009-01-11.02:16:41
SpamBayes Score 0.0034318785
Marked as misclassified No
Message-id <[email protected]>
In-reply-to
Content
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.
History
Date User Action Args
2009-01-11 02:16:43alex_python_orgsetrecipients: + alex_python_org
2009-01-11 02:16:43alex_python_orgsetmessageid: <[email protected]>
2009-01-11 02:16:42alex_python_orglinkissue4913 messages
2009-01-11 02:16:41alex_python_orgcreate