MCPcopy Index your code
hub / github.com/python/cpython / setparams

Method setparams

Lib/wave.py:568–581  ·  view source on GitHub ↗
(self, params)

Source from the content-addressed store, hash-verified

566 return self._compname
567
568 def setparams(self, params):
569 if self._datawritten:
570 raise Error('cannot change parameters after starting to write')
571 if len(params) == 6:
572 nchannels, sampwidth, framerate, nframes, comptype, compname = params
573 format = WAVE_FORMAT_PCM
574 else:
575 nchannels, sampwidth, framerate, nframes, comptype, compname, format = params
576 self.setnchannels(nchannels)
577 self.setformat(format)
578 self.setsampwidth(sampwidth)
579 self.setframerate(framerate)
580 self.setnframes(nframes)
581 self.setcomptype(comptype, compname)
582
583 def getparams(self):
584 if not self._nchannels or not self._sampwidth or not self._framerate:

Calls 7

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