mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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.
This commit is contained in:
parent
8db1823cf7
commit
d9a018222f
4 changed files with 21 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue