]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Small corrections to comments that were cloned from aifc; moreover
authorGuido van Rossum <guido@python.org>
Thu, 23 Apr 1998 21:40:02 +0000 (21:40 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 23 Apr 1998 21:40:02 +0000 (21:40 +0000)
the description of setparams() was wrong.

wave.py: Include the tag of an unknown format in the exception.

Lib/aifc.py
Lib/sunau.py
Lib/wave.py

index ea4f600e7b4c2dd8ccbdb6db57aba4c2e3591fde..0c62f8d18f9bde13e198a45079415e2d7e53316e 100644 (file)
 #      setcomptype(type, name)
 #                      -- set the compression type and the
 #                         human-readable compression type
-#      setparams(nchannels, sampwidth, framerate, nframes, comptype, compname)
+#      setparams(tuple)
 #                      -- set all parameters at once
 #      setmark(id, pos, name)
 #                      -- add specified mark to the list of marks
index aeac20eb3b8e820c420479fb7a9a54e8b3f261c8..02c13f555c5988860bd6ed456c8a1fbf70093eef 100644 (file)
@@ -48,9 +48,9 @@
 #      getsampwidth()  -- returns sample width in bytes
 #      getframerate()  -- returns sampling frequency
 #      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
-#                         compression type ('not compressed' for AIFF files)
+#                         compression type ('not compressed' matches 'NONE')
 #      getparams()     -- returns a tuple consisting of all of the
 #                         above in the above order
 #      getmarkers()    -- returns None (for compatibility with the
@@ -82,8 +82,7 @@
 #      setcomptype(type, name)
 #                      -- set the compression type and the
 #                         human-readable compression type
-#      setparams(nchannels, sampwidth, framerate, nframes, comptype, compname)
-#                      -- set all parameters at once
+#      setparams(tuple)-- set all parameters at once
 #      tell()          -- return current position in output file
 #      writeframesraw(data)
 #                      -- write audio frames without pathing up the
index 365bbf9c77ea7776bef0bba090e4ba9be6d03d0a..35e3b6bf3c735657b1bb73ee36baaa752def8e07 100644 (file)
@@ -15,9 +15,9 @@
 #      getsampwidth()  -- returns sample width in bytes
 #      getframerate()  -- returns sampling frequency
 #      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
-#                         compression type ('not compressed' for AIFF files)
+#                         compression type ('not compressed' linear samples)
 #      getparams()     -- returns a tuple consisting of all of the
 #                         above in the above order
 #      getmarkers()    -- returns None (for compatibility with the
@@ -49,7 +49,7 @@
 #      setcomptype(type, name)
 #                      -- set the compression type and the
 #                         human-readable compression type
-#      setparams(nchannels, sampwidth, framerate, nframes, comptype, compname)
+#      setparams(tuple)
 #                      -- set all parameters at once
 #      tell()          -- return current position in output file
 #      writeframesraw(data)
@@ -332,7 +332,7 @@ class Wave_read:
                if wFormatTag == WAVE_FORMAT_PCM:
                        self._sampwidth = (_read_short(chunk) + 7) / 8
                else:
-                       raise Error, 'unknown format'
+                       raise Error, 'unknown format: ' + `wFormatTag`
                self._framesize = self._nchannels * self._sampwidth
                self._comptype = 'NONE'
                self._compname = 'not compressed'