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
60adb362
Commit
60adb362
authored
Jan 05, 1999
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document the sndhdr module.
Document that the whatsound module is obsolete.
parent
a2e40173
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
6 deletions
+56
-6
Doc/lib/lib.tex
Doc/lib/lib.tex
+1
-0
Doc/lib/libsndhdr.tex
Doc/lib/libsndhdr.tex
+52
-0
Doc/lib/libundoc.tex
Doc/lib/libundoc.tex
+3
-6
No files found.
Doc/lib/lib.tex
View file @
60adb362
...
...
@@ -208,6 +208,7 @@ add new extensions to Python and how to embed it in other applications.
\input
{
libjpeg
}
\input
{
librgbimg
}
\input
{
libimghdr
}
\input
{
libsndhdr
}
\input
{
libcrypto
}
% Cryptographic Services
\input
{
libmd5
}
...
...
Doc/lib/libsndhdr.tex
0 → 100644
View file @
60adb362
\section
{
\module
{
sndhdr
}
---
Determine type of sound file.
}
\declaremodule
{
standard
}{
sndhdr
}
\modulesynopsis
{
Determine type of a sound file.
}
\sectionauthor
{
Fred L. Drake, Jr.
}{
fdrake@acm.org
}
% Based on comments in the module source file.
The
\module
{
sndhdr
}
provides utility functions which attempt to
determine the type of sound data which is in a file. When these
functions are able to determine what type of sound data is stored in a
file, they return a tuple
\code
{
(
\var
{
type
}
,
\var
{
sampling
_
rate
}
,
\var
{
channels
}
,
\var
{
frames
}
,
\var
{
bits
_
per
_
sample
}
)
}
. The value for
\var
{
type
}
indicates the data type and will be one of the strings
\code
{
'aifc'
}
,
\code
{
'aiff'
}
,
\code
{
'au'
}
,
\code
{
'hcom'
}
,
\code
{
'sndr'
}
,
\code
{
'sndt'
}
,
\code
{
'voc'
}
,
\code
{
'wav'
}
,
\code
{
'8svx'
}
,
\code
{
'sb'
}
,
\code
{
'ub'
}
, or
\code
{
'ul'
}
. The
\var
{
sampling
_
rate
}
will be either the actual value or
\code
{
0
}
if
unknown or difficult to decode. Similarly,
\var
{
channels
}
will be
either the number of channels or
\code
{
0
}
if it cannot be determined
or if the value is difficult to decode. The value for
\var
{
frames
}
will be either the number of frames or
\code
{
-1
}
. The last item in
the tuple,
\var
{
bits
_
per
_
sample
}
, will either be the sample size in
bits or
\code
{
'A'
}
for A-LAW
\index
{
A-LAW
}
or
\code
{
'U'
}
for
u-LAW
\index
{
u-LAW
}
.
\begin{funcdesc}
{
what
}{
filename
}
Determines the type of sound data stored in the file
\var
{
filename
}
using
\function
{
whathdr()
}
. If not successful,
\function
{
whatraw()
}
is used. If neither attempt succeeds, returns
\code
{
None
}
,
otherwise it returns a tuple as described above.
\end{funcdesc}
\begin{funcdesc}
{
whathdr
}{
filename
}
Determines the type of sound data stored in a file based on the file
header. The name of the file is given by
\var
{
filename
}
. This
function returns a tuple as described above on success, or
\code
{
None
}
.
\end{funcdesc}
\begin{funcdesc}
{
whatraw
}{
filename
}
Determines the type of raw sound data stored in a file without a
header. The name of the file is given by
\var
{
filename
}
. This
function returns a tuple as described above on success, or
\code
{
None
}
.
This requires the
\program
{
whatsound
}
program to work.
\end{funcdesc}
Doc/lib/libundoc.tex
View file @
60adb362
...
...
@@ -143,14 +143,8 @@ sizes (used by pdb)
\item
[toaiff.py]
--- Convert "arbitrary" sound files to AIFF files
\item
[sndhdr.py]
--- recognizing sound files
\item
[wave.py]
--- parse WAVE files
\item
[whatsound.py]
--- recognizing sound files
\end{description}
...
...
@@ -232,6 +226,9 @@ func.func_name, co.co_firstlineno).
--- Measure time intervals to high resolution (use
\function
{
time.clock()
}
instead). (This is an extension module.)
\item
[whatsound.py]
--- recognizing sound files
\item
[zmod.py]
--- Compute properties of mathematical "fields"
\end{description}
...
...
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