MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / writeframesraw

Method writeframesraw

tools/python-3.11.9-amd64/Lib/sunau.py:424–436  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

422 return self._nframeswritten
423
424 def writeframesraw(self, data):
425 if not isinstance(data, (bytes, bytearray)):
426 data = memoryview(data).cast('B')
427 self._ensure_header_written()
428 if self._comptype == 'ULAW':
429 with warnings.catch_warnings():
430 warnings.simplefilter('ignore', category=DeprecationWarning)
431 import audioop
432 data = audioop.lin2ulaw(data, self._sampwidth)
433 nframes = len(data) // self._framesize
434 self._file.write(data)
435 self._nframeswritten = self._nframeswritten + nframes
436 self._datawritten = self._datawritten + len(data)
437
438 def writeframes(self, data):
439 self.writeframesraw(data)

Callers 1

writeframesMethod · 0.95

Calls 2

writeMethod · 0.45

Tested by

no test coverage detected