(self, sampwidth)
| 504 | return self._nchannels |
| 505 | |
| 506 | def setsampwidth(self, sampwidth): |
| 507 | if self._datawritten: |
| 508 | raise Error('cannot change parameters after starting to write') |
| 509 | if self._format == WAVE_FORMAT_IEEE_FLOAT: |
| 510 | if sampwidth not in (4, 8): |
| 511 | raise Error('unsupported sample width for IEEE float format') |
| 512 | elif sampwidth < 1 or sampwidth > 4: |
| 513 | raise Error('bad sample width') |
| 514 | self._sampwidth = sampwidth |
| 515 | |
| 516 | def getsampwidth(self): |
| 517 | if not self._sampwidth: |