diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-21 09:02:30 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-21 09:02:30 (GMT) |
commit | d9a018222f4a885ca3eeee41a77103f5462e3813 (patch) | |
tree | d047cf723dff1351247f5138dceb549733fa8fa4 /Lib/wave.py | |
parent | 8db1823cf7963f5a8557eb840a20248bd18f658a (diff) | |
download | cpython-d9a018222f4a885ca3eeee41a77103f5462e3813.zip cpython-d9a018222f4a885ca3eeee41a77103f5462e3813.tar.gz cpython-d9a018222f4a885ca3eeee41a77103f5462e3813.tar.bz2 |
Issue #19633: Fixed writing not compressed 16- and 32-bit wave files on
big-endian platforms.
Temporary forbidden test_unseekable_incompleted_write fornot compressed 16-
and 32-bit wave file on big-endian platforms.
Diffstat (limited to 'Lib/wave.py')
-rw-r--r-- | Lib/wave.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/wave.py b/Lib/wave.py index 6285c74..4a22345 100644 --- a/Lib/wave.py +++ b/Lib/wave.py @@ -424,7 +424,9 @@ class Wave_write: data = self._convert(data) if self._sampwidth in (2, 4) and sys.byteorder == 'big': import array - data = array.array(_array_fmts[self._sampwidth], data) + a = array.array(_array_fmts[self._sampwidth]) + a.frombytes(data) + data = a assert data.itemsize == self._sampwidth data.byteswap() data.tofile(self._file) |