Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5fdeeea

Browse files
committed
Restructured library documentation
1 parent 0b07198 commit 5fdeeea

101 files changed

Lines changed: 12244 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Doc/lib/libal.tex

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
\section{Built-in Module \sectcode{al}}
2+
\bimodindex{al}
3+
4+
This module provides access to the audio facilities of the Indigo and
5+
4D/35 workstations, described in section 3A of the IRIX 4.0 man pages
6+
(and also available as an option in IRIX 3.3). You'll need to read
7+
those man pages to understand what these functions do!
8+
Some of the functions are not available in releases below 4.0.5.
9+
Again, see the manual to check whether a specific function is
10+
available on your platform.
11+
12+
Symbolic constants from the C header file \file{<audio.h>} are defined
13+
in the standard module \code{AL}, see below.
14+
15+
\strong{Warning:} the current version of the audio library may dump core
16+
when bad argument values are passed rather than returning an error
17+
status. Unfortunately, since the precise circumstances under which
18+
this may happen are undocumented and hard to check, the Python
19+
interface can provide no protection against this kind of problems.
20+
(One example is specifying an excessive queue size --- there is no
21+
documented upper limit.)
22+
23+
Module \code{al} defines the following functions:
24+
25+
\renewcommand{\indexsubitem}{(in module al)}
26+
\begin{funcdesc}{openport}{name\, direction\, config}
27+
Equivalent to the C function ALopenport(). The name and direction
28+
arguments are strings. The optional config argument is an opaque
29+
configuration object as returned by \code{al.newconfig()}. The return
30+
value is an opaque port object; methods of port objects are described
31+
below.
32+
\end{funcdesc}
33+
34+
\begin{funcdesc}{newconfig}{}
35+
Equivalent to the C function ALnewconfig(). The return value is a new
36+
opaque configuration object; methods of configuration objects are
37+
described below.
38+
\end{funcdesc}
39+
40+
\begin{funcdesc}{queryparams}{device}
41+
Equivalent to the C function ALqueryparams(). The device argument is
42+
an integer. The return value is a list of integers containing the
43+
data returned by ALqueryparams().
44+
\end{funcdesc}
45+
46+
\begin{funcdesc}{getparams}{device\, list}
47+
Equivalent to the C function ALgetparams(). The device argument is an
48+
integer. The list argument is a list such as returned by
49+
\code{queryparams}; it is modified in place (!).
50+
\end{funcdesc}
51+
52+
\begin{funcdesc}{setparams}{device\, list}
53+
Equivalent to the C function ALsetparams(). The device argument is an
54+
integer.The list argument is a list such as returned by
55+
\code{al.queryparams}.
56+
\end{funcdesc}
57+
58+
Configuration objects (returned by \code{al.newconfig()} have the
59+
following methods:
60+
61+
\renewcommand{\indexsubitem}{(audio configuration object method)}
62+
\begin{funcdesc}{getqueuesize}{}
63+
Return the queue size; equivalent to the C function ALgetqueuesize().
64+
\end{funcdesc}
65+
66+
\begin{funcdesc}{setqueuesize}{size}
67+
Set the queue size; equivalent to the C function ALsetqueuesize().
68+
\end{funcdesc}
69+
70+
\begin{funcdesc}{getwidth}{}
71+
Get the sample width; equivalent to the C function ALgetwidth().
72+
\end{funcdesc}
73+
74+
\begin{funcdesc}{getwidth}{width}
75+
Set the sample width; equivalent to the C function ALsetwidth().
76+
\end{funcdesc}
77+
78+
\begin{funcdesc}{getchannels}{}
79+
Get the channel count; equivalent to the C function ALgetchannels().
80+
\end{funcdesc}
81+
82+
\begin{funcdesc}{setchannels}{nchannels}
83+
Set the channel count; equivalent to the C function ALsetchannels().
84+
\end{funcdesc}
85+
86+
\begin{funcdesc}{getsampfmt}{}
87+
Get the sample format; equivalent to the C function ALgetsampfmt().
88+
\end{funcdesc}
89+
90+
\begin{funcdesc}{setsampfmt}{sampfmt}
91+
Set the sample format; equivalent to the C function ALsetsampfmt().
92+
\end{funcdesc}
93+
94+
\begin{funcdesc}{getfloatmax}{}
95+
Get the maximum value for floating sample formats;
96+
equivalent to the C function ALgetfloatmax().
97+
\end{funcdesc}
98+
99+
\begin{funcdesc}{setfloatmax}{floatmax}
100+
Set the maximum value for floating sample formats;
101+
equivalent to the C function ALsetfloatmax().
102+
\end{funcdesc}
103+
104+
Port objects (returned by \code{al.openport()} have the following
105+
methods:
106+
107+
\renewcommand{\indexsubitem}{(audio port object method)}
108+
\begin{funcdesc}{closeport}{}
109+
Close the port; equivalent to the C function ALcloseport().
110+
\end{funcdesc}
111+
112+
\begin{funcdesc}{getfd}{}
113+
Return the file descriptor as an int; equivalent to the C function
114+
ALgetfd().
115+
\end{funcdesc}
116+
117+
\begin{funcdesc}{getfilled}{}
118+
Return the number of filled samples; equivalent to the C function
119+
ALgetfilled().
120+
\end{funcdesc}
121+
122+
\begin{funcdesc}{getfillable}{}
123+
Return the number of fillable samples; equivalent to the C function
124+
ALgetfillable().
125+
\end{funcdesc}
126+
127+
\begin{funcdesc}{readsamps}{nsamples}
128+
Read a number of samples from the queue, blocking if necessary;
129+
equivalent to the C function ALreadsamples. The data is returned as a
130+
string containing the raw data (e.g. 2 bytes per sample in big-endian
131+
byte order (high byte, low byte) if you have set the sample width to 2
132+
bytes.
133+
\end{funcdesc}
134+
135+
\begin{funcdesc}{writesamps}{samples}
136+
Write samples into the queue, blocking if necessary; equivalent to the
137+
C function ALwritesamples. The samples are encoded as described for
138+
the \code{readsamps} return value.
139+
\end{funcdesc}
140+
141+
\begin{funcdesc}{getfillpoint}{}
142+
Return the `fill point'; equivalent to the C function ALgetfillpoint().
143+
\end{funcdesc}
144+
145+
\begin{funcdesc}{setfillpoint}{fillpoint}
146+
Set the `fill point'; equivalent to the C function ALsetfillpoint().
147+
\end{funcdesc}
148+
149+
\begin{funcdesc}{getconfig}{}
150+
Return a configuration object containing the current configuration of
151+
the port; equivalent to the C function ALgetconfig().
152+
\end{funcdesc}
153+
154+
\begin{funcdesc}{setconfig}{config}
155+
Set the configuration from the argument, a configuration object;
156+
equivalent to the C function ALsetconfig().
157+
\end{funcdesc}
158+
159+
\begin{funcdesc}{getstatus}{list}
160+
Get status information on last error
161+
equivalent to C function ALgetstatus().
162+
\end{funcdesc}
163+
164+
\section{Standard Module \sectcode{AL}}
165+
\nodename{AL (uppercase)}
166+
\stmodindex{AL}
167+
168+
This module defines symbolic constants needed to use the built-in
169+
module \code{al} (see above); they are equivalent to those defined in
170+
the C header file \file{<audio.h>} except that the name prefix
171+
\samp{AL_} is omitted. Read the module source for a complete list of
172+
the defined names. Suggested use:
173+
174+
\bcode\begin{verbatim}
175+
import al
176+
from AL import *
177+
\end{verbatim}\ecode

Doc/lib/libamoeba.tex

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
\chapter{AMOEBA ONLY}
2+
3+
\section{Built-in Module \sectcode{amoeba}}
4+
5+
\bimodindex{amoeba}
6+
This module provides some object types and operations useful for
7+
Amoeba applications. It is only available on systems that support
8+
Amoeba operations. RPC errors and other Amoeba errors are reported as
9+
the exception \code{amoeba.error = 'amoeba.error'}.
10+
11+
The module \code{amoeba} defines the following items:
12+
13+
\renewcommand{\indexsubitem}{(in module amoeba)}
14+
\begin{funcdesc}{name_append}{path\, cap}
15+
Stores a capability in the Amoeba directory tree.
16+
Arguments are the pathname (a string) and the capability (a capability
17+
object as returned by
18+
\code{name_lookup()}).
19+
\end{funcdesc}
20+
21+
\begin{funcdesc}{name_delete}{path}
22+
Deletes a capability from the Amoeba directory tree.
23+
Argument is the pathname.
24+
\end{funcdesc}
25+
26+
\begin{funcdesc}{name_lookup}{path}
27+
Looks up a capability.
28+
Argument is the pathname.
29+
Returns a
30+
\dfn{capability}
31+
object, to which various interesting operations apply, described below.
32+
\end{funcdesc}
33+
34+
\begin{funcdesc}{name_replace}{path\, cap}
35+
Replaces a capability in the Amoeba directory tree.
36+
Arguments are the pathname and the new capability.
37+
(This differs from
38+
\code{name_append()}
39+
in the behavior when the pathname already exists:
40+
\code{name_append()}
41+
finds this an error while
42+
\code{name_replace()}
43+
allows it, as its name suggests.)
44+
\end{funcdesc}
45+
46+
\begin{datadesc}{capv}
47+
A table representing the capability environment at the time the
48+
interpreter was started.
49+
(Alas, modifying this table does not affect the capability environment
50+
of the interpreter.)
51+
For example,
52+
\code{amoeba.capv['ROOT']}
53+
is the capability of your root directory, similar to
54+
\code{getcap("ROOT")}
55+
in C.
56+
\end{datadesc}
57+
58+
\begin{excdesc}{error}
59+
The exception raised when an Amoeba function returns an error.
60+
The value accompanying this exception is a pair containing the numeric
61+
error code and the corresponding string, as returned by the C function
62+
\code{err_why()}.
63+
\end{excdesc}
64+
65+
\begin{funcdesc}{timeout}{msecs}
66+
Sets the transaction timeout, in milliseconds.
67+
Returns the previous timeout.
68+
Initially, the timeout is set to 2 seconds by the Python interpreter.
69+
\end{funcdesc}
70+
71+
\subsection{Capability Operations}
72+
73+
Capabilities are written in a convenient ASCII format, also used by the
74+
Amoeba utilities
75+
{\it c2a}(U)
76+
and
77+
{\it a2c}(U).
78+
For example:
79+
80+
\bcode\begin{verbatim}
81+
>>> amoeba.name_lookup('/profile/cap')
82+
aa:1c:95:52:6a:fa/14(ff)/8e:ba:5b:8:11:1a
83+
>>>
84+
\end{verbatim}\ecode
85+
86+
The following methods are defined for capability objects.
87+
88+
\renewcommand{\indexsubitem}{(capability method)}
89+
\begin{funcdesc}{dir_list}{}
90+
Returns a list of the names of the entries in an Amoeba directory.
91+
\end{funcdesc}
92+
93+
\begin{funcdesc}{b_read}{offset\, maxsize}
94+
Reads (at most)
95+
\var{maxsize}
96+
bytes from a bullet file at offset
97+
\var{offset.}
98+
The data is returned as a string.
99+
EOF is reported as an empty string.
100+
\end{funcdesc}
101+
102+
\begin{funcdesc}{b_size}{}
103+
Returns the size of a bullet file.
104+
\end{funcdesc}
105+
106+
\begin{funcdesc}{dir_append}{}
107+
\funcline{dir_delete}{}\
108+
\funcline{dir_lookup}{}\
109+
\funcline{dir_replace}{}
110+
Like the corresponding
111+
\samp{name_}*
112+
functions, but with a path relative to the capability.
113+
(For paths beginning with a slash the capability is ignored, since this
114+
is the defined semantics for Amoeba.)
115+
\end{funcdesc}
116+
117+
\begin{funcdesc}{std_info}{}
118+
Returns the standard info string of the object.
119+
\end{funcdesc}
120+
121+
\begin{funcdesc}{tod_gettime}{}
122+
Returns the time (in seconds since the Epoch, in UCT, as for POSIX) from
123+
a time server.
124+
\end{funcdesc}
125+
126+
\begin{funcdesc}{tod_settime}{t}
127+
Sets the time kept by a time server.
128+
\end{funcdesc}

0 commit comments

Comments
 (0)