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
c2bac874
Commit
c2bac874
authored
Oct 06, 2000
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include more information from the docstrings.
parent
3a844a28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
7 deletions
+49
-7
Doc/lib/libsunau.tex
Doc/lib/libsunau.tex
+49
-7
No files found.
Doc/lib/libsunau.tex
View file @
c2bac874
...
@@ -5,9 +5,28 @@
...
@@ -5,9 +5,28 @@
\sectionauthor
{
Moshe Zadka
}{
mzadka@geocities.com
}
\sectionauthor
{
Moshe Zadka
}{
mzadka@geocities.com
}
\modulesynopsis
{
Provide an interface to the Sun AU sound format.
}
\modulesynopsis
{
Provide an interface to the Sun AU sound format.
}
The
\module
{
sunau
}
module provides a convenient interface to the Sun AU sound
The
\module
{
sunau
}
module provides a convenient interface to the Sun
format. Note that this module is interface-compatible with the modules
AU sound format. Note that this module is interface-compatible with
\refmodule
{
aifc
}
and
\refmodule
{
wave
}
.
the modules
\refmodule
{
aifc
}
and
\refmodule
{
wave
}
.
An audio file consists of a header followed by the data. The fields
of the header are:
\begin{tableii}
{
l|l
}{
textrm
}{
Field
}{
Contents
}
\lineii
{
magic word
}{
The four bytes
\samp
{
.snd
}
.
}
\lineii
{
header size
}{
Size of the header, including info, in bytes.
}
\lineii
{
data size
}{
Physical size of the data, in bytes.
}
\lineii
{
encoding
}{
Indicates how the audio samples are encoded.
}
\lineii
{
sample rate
}{
The sampling rate.
}
\lineii
{
\#
of channels
}{
The number of channels in the samples.
}
\lineii
{
info
}{
\ASCII
{}
string giving a description of the audio
file (padded with null bytes).
}
\end{tableii}
Apart from the info field, all header fields are 4 bytes in size.
They are all 32-bit unsigned integers encoded in big-endian byte
order.
The
\module
{
sunau
}
module defines the following functions:
The
\module
{
sunau
}
module defines the following functions:
...
@@ -36,10 +55,31 @@ An error raised when something is impossible because of Sun AU specs or
...
@@ -36,10 +55,31 @@ An error raised when something is impossible because of Sun AU specs or
implementation deficiency.
implementation deficiency.
\end{excdesc}
\end{excdesc}
The
\module
{
sunau
}
module defines the following data item:
The
\module
{
sunau
}
module defines the following data item
s
:
\begin{datadesc}
{
AUDIO
_
FILE
_
MAGIC
}
\begin{datadesc}
{
AUDIO
_
FILE
_
MAGIC
}
An integer every valid Sun AU file begins with a big-endian encoding of.
An integer every valid Sun AU file begins with, stored in big-endian
form. This is the string
\samp
{
.snd
}
interpreted as an integer.
\end{datadesc}
\begin{datadesc}
{
AUDIO
_
FILE
_
ENCODING
_
MULAW
_
8
}
\dataline
{
AUDIO
_
FILE
_
ENCODING
_
LINEAR
_
8
}
\dataline
{
AUDIO
_
FILE
_
ENCODING
_
LINEAR
_
16
}
\dataline
{
AUDIO
_
FILE
_
ENCODING
_
LINEAR
_
24
}
\dataline
{
AUDIO
_
FILE
_
ENCODING
_
LINEAR
_
32
}
\dataline
{
AUDIO
_
FILE
_
ENCODING
_
ALAW
_
8
}
Values of the encoding field from the AU header which are supported by
this module.
\end{datadesc}
\begin{datadesc}
{
AUDIO
_
FILE
_
ENCODING
_
FLOAT
}
\dataline
{
AUDIO
_
FILE
_
ENCODING
_
DOUBLE
}
\dataline
{
AUDIO
_
FILE
_
ENCODING
_
ADPCM
_
G721
}
\dataline
{
AUDIO
_
FILE
_
ENCODING
_
ADPCM
_
G722
}
\dataline
{
AUDIO
_
FILE
_
ENCODING
_
ADPCM
_
G723
_
3
}
\dataline
{
AUDIO
_
FILE
_
ENCODING
_
ADPCM
_
G723
_
5
}
Additional known values of the encoding field from the AU header, but
which are not supported by this module.
\end{datadesc}
\end{datadesc}
...
@@ -98,11 +138,13 @@ The following two methods define a term ``position'' which is compatible
...
@@ -98,11 +138,13 @@ The following two methods define a term ``position'' which is compatible
between them, and is otherwise implementation dependent.
between them, and is otherwise implementation dependent.
\begin{methoddesc}
[AU
_
read]
{
setpos
}{
pos
}
\begin{methoddesc}
[AU
_
read]
{
setpos
}{
pos
}
Set the file pointer to the specified position.
Set the file pointer to the specified position. Only values returned
from
\method
{
tell()
}
should be used for
\var
{
pos
}
.
\end{methoddesc}
\end{methoddesc}
\begin{methoddesc}
[AU
_
read]
{
tell
}{}
\begin{methoddesc}
[AU
_
read]
{
tell
}{}
Return current file pointer position.
Return current file pointer position. Note that the returned value
has nothing to do with the actual position in the file.
\end{methoddesc}
\end{methoddesc}
The following two functions are defined for compatibility with the
The following two functions are defined for compatibility with the
...
...
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