1 \section{Built-in Module
\sectcode{al
}}
4 This module provides access to the audio facilities of the SGI Indy
5 and Indigo workstations. See section
3A of the IRIX man pages for
6 details. You'll need to read those man pages to understand what these
7 functions do! Some of the functions are not available in IRIX
8 releases before
4.0.5. Again, see the manual to check whether a
9 specific function is available on your platform.
11 All functions and methods defined in this module are equivalent to
12 the C functions with
\samp{AL
} prefixed to their name.
14 Symbolic constants from the C header file
\file{<audio.h>
} are defined
15 in the standard module
\code{AL
}, see below.
17 \strong{Warning:
} the current version of the audio library may dump core
18 when bad argument values are passed rather than returning an error
19 status. Unfortunately, since the precise circumstances under which
20 this may happen are undocumented and hard to check, the Python
21 interface can provide no protection against this kind of problems.
22 (One example is specifying an excessive queue size --- there is no
23 documented upper limit.)
25 The module defines the following functions:
27 \renewcommand{\indexsubitem}{(in module al)
}
29 \begin{funcdesc
}{openport
}{name\, direction
\optional{\, config
}}
30 The name and direction arguments are strings. The optional config
31 argument is a configuration object as returned by
32 \code{al.newconfig()
}. The return value is an
\dfn{port object
};
33 methods of port objects are described below.
36 \begin{funcdesc
}{newconfig
}{}
37 The return value is a new
\dfn{configuration object
}; methods of
38 configuration objects are described below.
41 \begin{funcdesc
}{queryparams
}{device
}
42 The device argument is an integer. The return value is a list of
43 integers containing the data returned by ALqueryparams().
46 \begin{funcdesc
}{getparams
}{device\, list
}
47 The device argument is an integer. The list argument is a list such
48 as returned by
\code{queryparams
}; it is modified in place (!).
51 \begin{funcdesc
}{setparams
}{device\, list
}
52 The device argument is an integer. The list argument is a list such
53 as returned by
\code{al.queryparams
}.
56 \subsection{Configuration Objects
}
58 Configuration objects (returned by
\code{al.newconfig()
} have the
61 \renewcommand{\indexsubitem}{(audio configuration object method)
}
63 \begin{funcdesc
}{getqueuesize
}{}
64 Return the queue size.
67 \begin{funcdesc
}{setqueuesize
}{size
}
71 \begin{funcdesc
}{getwidth
}{}
75 \begin{funcdesc
}{setwidth
}{width
}
79 \begin{funcdesc
}{getchannels
}{}
80 Get the channel count.
83 \begin{funcdesc
}{setchannels
}{nchannels
}
84 Set the channel count.
87 \begin{funcdesc
}{getsampfmt
}{}
88 Get the sample format.
91 \begin{funcdesc
}{setsampfmt
}{sampfmt
}
92 Set the sample format.
95 \begin{funcdesc
}{getfloatmax
}{}
96 Get the maximum value for floating sample formats.
99 \begin{funcdesc
}{setfloatmax
}{floatmax
}
100 Set the maximum value for floating sample formats.
103 \subsection{Port Objects
}
105 Port objects (returned by
\code{al.openport()
} have the following
108 \renewcommand{\indexsubitem}{(audio port object method)
}
110 \begin{funcdesc
}{closeport
}{}
114 \begin{funcdesc
}{getfd
}{}
115 Return the file descriptor as an int.
118 \begin{funcdesc
}{getfilled
}{}
119 Return the number of filled samples.
122 \begin{funcdesc
}{getfillable
}{}
123 Return the number of fillable samples.
126 \begin{funcdesc
}{readsamps
}{nsamples
}
127 Read a number of samples from the queue, blocking if necessary.
128 Return the data as a string containing the raw data, (e.g.,
2 bytes per
129 sample in big-endian byte order (high byte, low byte) if you have set
130 the sample width to
2 bytes).
133 \begin{funcdesc
}{writesamps
}{samples
}
134 Write samples into the queue, blocking if necessary. The samples are
135 encoded as described for the
\code{readsamps
} return value.
138 \begin{funcdesc
}{getfillpoint
}{}
139 Return the `fill point'.
142 \begin{funcdesc
}{setfillpoint
}{fillpoint
}
143 Set the `fill point'.
146 \begin{funcdesc
}{getconfig
}{}
147 Return a configuration object containing the current configuration of
151 \begin{funcdesc
}{setconfig
}{config
}
152 Set the configuration from the argument, a configuration object.
155 \begin{funcdesc
}{getstatus
}{list
}
156 Get status information on last error.
159 \section{Standard Module
\sectcode{AL
}}
160 \nodename{AL (uppercase)
}
163 This module defines symbolic constants needed to use the built-in
164 module
\code{al
} (see above); they are equivalent to those defined in
165 the C header file
\file{<audio.h>
} except that the name prefix
166 \samp{AL_
} is omitted. Read the module source for a complete list of
167 the defined names. Suggested use:
169 \bcode\begin{verbatim
}