diff options
Diffstat (limited to 'Lib/sunau.py')
| -rw-r--r-- | Lib/sunau.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/sunau.py b/Lib/sunau.py index 5761390361..1880a01d1a 100644 --- a/Lib/sunau.py +++ b/Lib/sunau.py @@ -352,7 +352,7 @@ class Au_write: def setsampwidth(self, sampwidth): if self._nframeswritten: raise Error('cannot change parameters after starting to write') - if sampwidth not in (1, 2, 4): + if sampwidth not in (1, 2, 3, 4): raise Error('bad sample width') self._sampwidth = sampwidth @@ -465,6 +465,9 @@ class Au_write: elif self._sampwidth == 2: encoding = AUDIO_FILE_ENCODING_LINEAR_16 self._framesize = 2 + elif self._sampwidth == 3: + encoding = AUDIO_FILE_ENCODING_LINEAR_24 + self._framesize = 3 elif self._sampwidth == 4: encoding = AUDIO_FILE_ENCODING_LINEAR_32 self._framesize = 4 |
