mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
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.
This commit is contained in:
parent
1740b8d2f7
commit
bb189dbcb0
3 changed files with 8 additions and 9 deletions
|
@ -102,7 +102,7 @@
|
||||||
# setcomptype(type, name)
|
# setcomptype(type, name)
|
||||||
# -- set the compression type and the
|
# -- set the compression type and the
|
||||||
# human-readable compression type
|
# human-readable compression type
|
||||||
# setparams(nchannels, sampwidth, framerate, nframes, comptype, compname)
|
# setparams(tuple)
|
||||||
# -- set all parameters at once
|
# -- set all parameters at once
|
||||||
# setmark(id, pos, name)
|
# setmark(id, pos, name)
|
||||||
# -- add specified mark to the list of marks
|
# -- add specified mark to the list of marks
|
||||||
|
|
|
@ -48,9 +48,9 @@
|
||||||
# getsampwidth() -- returns sample width in bytes
|
# getsampwidth() -- returns sample width in bytes
|
||||||
# getframerate() -- returns sampling frequency
|
# getframerate() -- returns sampling frequency
|
||||||
# getnframes() -- returns number of audio frames
|
# getnframes() -- returns number of audio frames
|
||||||
# getcomptype() -- returns compression type ('NONE' for AIFF files)
|
# getcomptype() -- returns compression type ('NONE' or 'ULAW')
|
||||||
# getcompname() -- returns human-readable version of
|
# getcompname() -- returns human-readable version of
|
||||||
# compression type ('not compressed' for AIFF files)
|
# compression type ('not compressed' matches 'NONE')
|
||||||
# getparams() -- returns a tuple consisting of all of the
|
# getparams() -- returns a tuple consisting of all of the
|
||||||
# above in the above order
|
# above in the above order
|
||||||
# getmarkers() -- returns None (for compatibility with the
|
# getmarkers() -- returns None (for compatibility with the
|
||||||
|
@ -82,8 +82,7 @@
|
||||||
# setcomptype(type, name)
|
# setcomptype(type, name)
|
||||||
# -- set the compression type and the
|
# -- set the compression type and the
|
||||||
# human-readable compression type
|
# human-readable compression type
|
||||||
# setparams(nchannels, sampwidth, framerate, nframes, comptype, compname)
|
# setparams(tuple)-- set all parameters at once
|
||||||
# -- set all parameters at once
|
|
||||||
# tell() -- return current position in output file
|
# tell() -- return current position in output file
|
||||||
# writeframesraw(data)
|
# writeframesraw(data)
|
||||||
# -- write audio frames without pathing up the
|
# -- write audio frames without pathing up the
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
# getsampwidth() -- returns sample width in bytes
|
# getsampwidth() -- returns sample width in bytes
|
||||||
# getframerate() -- returns sampling frequency
|
# getframerate() -- returns sampling frequency
|
||||||
# getnframes() -- returns number of audio frames
|
# getnframes() -- returns number of audio frames
|
||||||
# getcomptype() -- returns compression type ('NONE' for AIFF files)
|
# getcomptype() -- returns compression type ('NONE' for linear samples)
|
||||||
# getcompname() -- returns human-readable version of
|
# getcompname() -- returns human-readable version of
|
||||||
# compression type ('not compressed' for AIFF files)
|
# compression type ('not compressed' linear samples)
|
||||||
# getparams() -- returns a tuple consisting of all of the
|
# getparams() -- returns a tuple consisting of all of the
|
||||||
# above in the above order
|
# above in the above order
|
||||||
# getmarkers() -- returns None (for compatibility with the
|
# getmarkers() -- returns None (for compatibility with the
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
# setcomptype(type, name)
|
# setcomptype(type, name)
|
||||||
# -- set the compression type and the
|
# -- set the compression type and the
|
||||||
# human-readable compression type
|
# human-readable compression type
|
||||||
# setparams(nchannels, sampwidth, framerate, nframes, comptype, compname)
|
# setparams(tuple)
|
||||||
# -- set all parameters at once
|
# -- set all parameters at once
|
||||||
# tell() -- return current position in output file
|
# tell() -- return current position in output file
|
||||||
# writeframesraw(data)
|
# writeframesraw(data)
|
||||||
|
@ -332,7 +332,7 @@ class Wave_read:
|
||||||
if wFormatTag == WAVE_FORMAT_PCM:
|
if wFormatTag == WAVE_FORMAT_PCM:
|
||||||
self._sampwidth = (_read_short(chunk) + 7) / 8
|
self._sampwidth = (_read_short(chunk) + 7) / 8
|
||||||
else:
|
else:
|
||||||
raise Error, 'unknown format'
|
raise Error, 'unknown format: ' + `wFormatTag`
|
||||||
self._framesize = self._nchannels * self._sampwidth
|
self._framesize = self._nchannels * self._sampwidth
|
||||||
self._comptype = 'NONE'
|
self._comptype = 'NONE'
|
||||||
self._compname = 'not compressed'
|
self._compname = 'not compressed'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue