Issue #16685: Added support for writing any bytes-like objects in the aifc,

sunau, and wave modules.
This commit is contained in:
Serhiy Storchaka 2013-11-16 14:01:31 +02:00
parent 7714ebbe0e
commit 452bab4acf
8 changed files with 51 additions and 0 deletions

View file

@ -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