mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Issue #16685: Added support for writing any bytes-like objects in the aifc,
sunau, and wave modules.
This commit is contained in:
parent
7714ebbe0e
commit
452bab4acf
8 changed files with 51 additions and 0 deletions
|
@ -415,6 +415,8 @@ class Au_write:
|
|||
return self._nframeswritten
|
||||
|
||||
def writeframesraw(self, data):
|
||||
if not isinstance(data, (bytes, bytearray)):
|
||||
data = memoryview(data).cast('B')
|
||||
self._ensure_header_written()
|
||||
if self._comptype == 'ULAW':
|
||||
import audioop
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue