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

Skip to content

Commit bb189db

Browse files
committed
Small corrections to comments that were cloned from aifc; moreover
the description of setparams() was wrong. wave.py: Include the tag of an unknown format in the exception.
1 parent 1740b8d commit bb189db

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

Lib/aifc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
# setcomptype(type, name)
103103
# -- set the compression type and the
104104
# human-readable compression type
105-
# setparams(nchannels, sampwidth, framerate, nframes, comptype, compname)
105+
# setparams(tuple)
106106
# -- set all parameters at once
107107
# setmark(id, pos, name)
108108
# -- add specified mark to the list of marks

Lib/sunau.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
# getsampwidth() -- returns sample width in bytes
4949
# getframerate() -- returns sampling frequency
5050
# getnframes() -- returns number of audio frames
51-
# getcomptype() -- returns compression type ('NONE' for AIFF files)
51+
# getcomptype() -- returns compression type ('NONE' or 'ULAW')
5252
# getcompname() -- returns human-readable version of
53-
# compression type ('not compressed' for AIFF files)
53+
# compression type ('not compressed' matches 'NONE')
5454
# getparams() -- returns a tuple consisting of all of the
5555
# above in the above order
5656
# getmarkers() -- returns None (for compatibility with the
@@ -82,8 +82,7 @@
8282
# setcomptype(type, name)
8383
# -- set the compression type and the
8484
# human-readable compression type
85-
# setparams(nchannels, sampwidth, framerate, nframes, comptype, compname)
86-
# -- set all parameters at once
85+
# setparams(tuple)-- set all parameters at once
8786
# tell() -- return current position in output file
8887
# writeframesraw(data)
8988
# -- write audio frames without pathing up the

Lib/wave.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
# getsampwidth() -- returns sample width in bytes
1616
# getframerate() -- returns sampling frequency
1717
# getnframes() -- returns number of audio frames
18-
# getcomptype() -- returns compression type ('NONE' for AIFF files)
18+
# getcomptype() -- returns compression type ('NONE' for linear samples)
1919
# getcompname() -- returns human-readable version of
20-
# compression type ('not compressed' for AIFF files)
20+
# compression type ('not compressed' linear samples)
2121
# getparams() -- returns a tuple consisting of all of the
2222
# above in the above order
2323
# getmarkers() -- returns None (for compatibility with the
@@ -49,7 +49,7 @@
4949
# setcomptype(type, name)
5050
# -- set the compression type and the
5151
# human-readable compression type
52-
# setparams(nchannels, sampwidth, framerate, nframes, comptype, compname)
52+
# setparams(tuple)
5353
# -- set all parameters at once
5454
# tell() -- return current position in output file
5555
# writeframesraw(data)
@@ -332,7 +332,7 @@ def _read_fmt_chunk(self, chunk):
332332
if wFormatTag == WAVE_FORMAT_PCM:
333333
self._sampwidth = (_read_short(chunk) + 7) / 8
334334
else:
335-
raise Error, 'unknown format'
335+
raise Error, 'unknown format: ' + `wFormatTag`
336336
self._framesize = self._nchannels * self._sampwidth
337337
self._comptype = 'NONE'
338338
self._compname = 'not compressed'

0 commit comments

Comments
 (0)