al
— Audio functions on the SGIDeprecated since version 2.6: The al
module has been removed in Python 3.
This module provides access to the audio facilities of the SGI Indy and Indigo workstations. See section 3A of the IRIX man pages for details. You’ll need to read those man pages to understand what these functions do! Some of the functions are not available in IRIX releases before 4.0.5. Again, see the manual to check whether a specific function is available on your platform.
All functions and methods defined in this module are equivalent to the C
functions with AL
prefixed to their name.
Symbolic constants from the C header file <audio.h>
are defined in the
standard module AL
, see below.
Warning
The current version of the audio library may dump core when bad argument values are passed rather than returning an error status. Unfortunately, since the precise circumstances under which this may happen are undocumented and hard to check, the Python interface can provide no protection against this kind of problems. (One example is specifying an excessive queue size — there is no documented upper limit.)
The module defines the following functions:
al.
openport
(name, direction[, config])newconfig()
. The return value is an audio port object; methods of audio port objects are described below.al.
newconfig
()al.
queryparams
(device)ALqueryparams()
.al.
getparams
(device, list)queryparams()
; it is modified in place (!).al.
setparams
(device, list)queryparams()
.
Configuration objects returned by newconfig()
have the following methods:
audio configuration.getqueuesize()
audio configuration.setqueuesize(size)
audio configuration.getwidth()
audio configuration.setwidth(width)
audio configuration.getchannels()
audio configuration.setchannels(nchannels)
audio configuration.getsampfmt()
audio configuration.setsampfmt(sampfmt)
audio configuration.getfloatmax()
audio configuration.setfloatmax(floatmax)
Port objects, as returned by openport()
, have the following methods:
audio port.closeport()
audio port.getfd()
audio port.getfilled()
audio port.getfillable()
audio port.readsamps(nsamples)
audio port.writesamps(samples)
readsamps()
return value.audio port.getfillpoint()
audio port.setfillpoint(fillpoint)
audio port.getconfig()
audio port.setconfig(config)
audio port.getstatus(list)
AL
— Constants used with the al
moduleDeprecated since version 2.6: The AL
module has been removed in Python 3.
This module defines symbolic constants needed to use the built-in module
al
(see above); they are equivalent to those defined in the C header file
<audio.h>
except that the name prefix AL_
is omitted. Read the module
source for a complete list of the defined names. Suggested use:
import al
from AL import *