Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e08a66a3
Commit
e08a66a3
authored
Apr 29, 2009
by
R. David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document the fact that 'compname' and 'comptype' are bytes.
parent
a3b0d20a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
Doc/library/aifc.rst
Doc/library/aifc.rst
+12
-9
Lib/test/test_aifc.py
Lib/test/test_aifc.py
+0
-2
No files found.
Doc/library/aifc.rst
View file @
e08a66a3
...
@@ -74,14 +74,16 @@ following methods:
...
@@ -74,14 +74,16 @@ following methods:
.. method:: aifc.getcomptype()
.. method:: aifc.getcomptype()
Return a four-character string describing the type of compression used in the
Return a bytes array of length 4 describing the type of compression
audio file. For AIFF files, the returned value is ``'NONE'``.
used in the audio file. For AIFF files, the returned value is
``b'NONE'``.
.. method:: aifc.getcompname()
.. method:: aifc.getcompname()
Return a human-readable description of the type of compression used in the audio
Return a bytes array convertible to a human-readable description
file. For AIFF files, the returned value is ``'not compressed'``.
of the type of compression used in the audio file. For AIFF files,
the returned value is ``b'not compressed'``.
.. method:: aifc.getparams()
.. method:: aifc.getparams()
...
@@ -180,11 +182,12 @@ number of frames must be filled in.
...
@@ -180,11 +182,12 @@ number of frames must be filled in.
single: A-LAW
single: A-LAW
single: G.722
single: G.722
Specify the compression type. If not specified, the audio data will not be
Specify the compression type. If not specified, the audio data will
compressed. In AIFF files, compression is not possible. The name parameter
not be compressed. In AIFF files, compression is not possible.
should be a human-readable description of the compression type, the type
The name parameter should be a human-readable description of the
parameter should be a four-character string. Currently the following
compression type as a bytes array, the type parameter should be a
compression types are supported: NONE, ULAW, ALAW, G722.
bytes array of length 4. Currently the following compression types
are supported: ``b'NONE'``, ``b'ULAW'``, ``b'ALAW'``, ``b'G722'``.
.. method:: aifc.setparams(nchannels, sampwidth, framerate, comptype, compname)
.. method:: aifc.setparams(nchannels, sampwidth, framerate, comptype, compname)
...
...
Lib/test/test_aifc.py
View file @
e08a66a3
...
@@ -35,8 +35,6 @@ class AIFCTest(unittest.TestCase):
...
@@ -35,8 +35,6 @@ class AIFCTest(unittest.TestCase):
self
.
assertEqual
(
f
.
getsampwidth
(),
2
)
self
.
assertEqual
(
f
.
getsampwidth
(),
2
)
self
.
assertEqual
(
f
.
getframerate
(),
48000
)
self
.
assertEqual
(
f
.
getframerate
(),
48000
)
self
.
assertEqual
(
f
.
getnframes
(),
14400
)
self
.
assertEqual
(
f
.
getnframes
(),
14400
)
# XXX: are the next two correct? The docs say/imply they are supposed
# to be strings.
self
.
assertEqual
(
f
.
getcomptype
(),
b'NONE'
)
self
.
assertEqual
(
f
.
getcomptype
(),
b'NONE'
)
self
.
assertEqual
(
f
.
getcompname
(),
b'not compressed'
)
self
.
assertEqual
(
f
.
getcompname
(),
b'not compressed'
)
self
.
assertEqual
(
self
.
assertEqual
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment