mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Issue #19641: Added the audioop.byteswap() function to convert big-endian
samples to little-endian and vice versa.
This commit is contained in:
parent
2b38fc187c
commit
3062c9a6c8
10 changed files with 80 additions and 78 deletions
|
|
@ -1,6 +1,7 @@
|
|||
from test.support import TESTFN
|
||||
import unittest
|
||||
from test import audiotests
|
||||
from audioop import byteswap
|
||||
import sys
|
||||
import sunau
|
||||
|
||||
|
|
@ -124,7 +125,7 @@ class SunauULAWTest(audiotests.AudioWriteTests,
|
|||
E5040CBC 617C0A3C 08BC0A3C 2C7C0B3C 517C0E3C 8A8410FC B6840EBC 457C0A3C \
|
||||
""")
|
||||
if sys.byteorder != 'big':
|
||||
frames = audiotests.byteswap2(frames)
|
||||
frames = byteswap(frames, 2)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue