Port Objects -- Python library reference



Prev: Configuration Objects Up: al Top: Top

16.1.2. Port Objects

Port objects (returned by al.openport() have the following methods:

closeport () -- Method on audio port object
Close the port.
getfd () -- Method on audio port object
Return the file descriptor as an int.
getfilled () -- Method on audio port object
Return the number of filled samples.
getfillable () -- Method on audio port object
Return the number of fillable samples.
readsamps (nsamples) -- Method on audio port object
Read a number of samples from the queue, blocking if necessary. Return the data as a string containing the raw data, (e.g., 2 bytes per sample in big-endian byte order (high byte, low byte) if you have set the sample width to 2 bytes).
writesamps (samples) -- Method on audio port object
Write samples into the queue, blocking if necessary. The samples are encoded as described for the readsamps return value.
getfillpoint () -- Method on audio port object
Return the `fill point'.
setfillpoint (fillpoint) -- Method on audio port object
Set the `fill point'.
getconfig () -- Method on audio port object
Return a configuration object containing the current configuration of the port.
setconfig (config) -- Method on audio port object
Set the configuration from the argument, a configuration object.
getstatus (list) -- Method on audio port object
Get status information on last error.


Prev: Configuration Objects Up: al Top: Top