Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5ebeea0

Browse files
committed
Shouldn't be treating linear-8 as u-law!
1 parent 2ff880e commit 5ebeea0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/sunau.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,11 @@ def initfp(self, file):
180180
if self._encoding not in _simple_encodings:
181181
raise Error, 'encoding not (yet) supported'
182182
if self._encoding in (AUDIO_FILE_ENCODING_MULAW_8,
183-
AUDIO_FILE_ENCODING_LINEAR_8,
184183
AUDIO_FILE_ENCODING_ALAW_8):
185184
self._sampwidth = 2
186185
self._framesize = 1
186+
elif self._encoding == AUDIO_FILE_ENCODING_LINEAR_8:
187+
self._framesize = self._sampwidth = 1
187188
elif self._encoding == AUDIO_FILE_ENCODING_LINEAR_16:
188189
self._framesize = self._sampwidth = 2
189190
elif self._encoding == AUDIO_FILE_ENCODING_LINEAR_24:

0 commit comments

Comments
 (0)