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 jeroen
Recipients gvanrossum, jeroen
Date 2007-11-12.18:35:26
SpamBayes Score 0.032841284
Marked as misclassified No
Message-id <007101c8255a$65a29fa0$30e7dee0$@com>
In-reply-to <1194888263.58.0.152888115527.issue1423@psf.upfronthosting.co.za>
Content
I played using winsound.PlaySound function for the wav. I used VLC and windows media player for wav,au and aiff after that

All had the same problem. It was solved for sunau by doubling the nframes number written by the close function in the sunau module. I assume something similar should be done for the wav and aiff modules.

This is what I changed in sunau I am not sure if adding *self._sampwidth breaks something else. It works for me now when I create 16bit stereo files.

def _patchheader(self):
        self._file.seek(8)
        # jjk added * sampwidth otherwise for 16 bit you get wrong nframes
        _write_u32(self._file, self._datawritten*self._sampwidth)
        self._datalength = self._datawritten
        self._file.seek(0, 2)

Hope this helps.
greetings
History
Date User Action Args
2007-11-12 18:35:27jeroensetspambayes_score: 0.0328413 -> 0.032841284
recipients: + jeroen, gvanrossum
2007-11-12 18:35:27jeroenlinkissue1423 messages
2007-11-12 18:35:26jeroencreate