(self, format)
| 548 | self._compname = compname |
| 549 | |
| 550 | def setformat(self, format): |
| 551 | if self._datawritten: |
| 552 | raise Error('cannot change parameters after starting to write') |
| 553 | if format not in (WAVE_FORMAT_IEEE_FLOAT, WAVE_FORMAT_PCM): |
| 554 | raise Error('unsupported wave format') |
| 555 | if format == WAVE_FORMAT_IEEE_FLOAT and self._sampwidth and self._sampwidth not in (4, 8): |
| 556 | raise Error('unsupported sample width for IEEE float format') |
| 557 | self._format = format |
| 558 | |
| 559 | def getformat(self): |
| 560 | return self._format |