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

Method setparams

tools/python-3.11.9-amd64/Lib/aifc.py:698–709  ·  view source on GitHub ↗
(self, params)

Source from the content-addressed store, hash-verified

696## self._version = version
697
698 def setparams(self, params):
699 nchannels, sampwidth, framerate, nframes, comptype, compname = params
700 if self._nframeswritten:
701 raise Error('cannot change parameters after starting to write')
702 if comptype not in (b'NONE', b'ulaw', b'ULAW',
703 b'alaw', b'ALAW', b'G722', b'sowt', b'SOWT'):
704 raise Error('unsupported compression type')
705 self.setnchannels(nchannels)
706 self.setsampwidth(sampwidth)
707 self.setframerate(framerate)
708 self.setnframes(nframes)
709 self.setcomptype(comptype, compname)
710
711 def getparams(self):
712 if not self._nchannels or not self._sampwidth or not self._framerate:

Callers 1

aifc.pyFile · 0.45

Calls 6

setnchannelsMethod · 0.95
setsampwidthMethod · 0.95
setframerateMethod · 0.95
setnframesMethod · 0.95
setcomptypeMethod · 0.95
ErrorClass · 0.70

Tested by

no test coverage detected