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