Next: , Previous: , Up: Audio Processing   [Contents][Index]


33.2 Audio Device Information

: devinfo = audiodevinfo ()
: devs = audiodevinfo (io)
: name = audiodevinfo (io, id)
: id = audiodevinfo (io, name)
: driverversion = audiodevinfo (io, id, "DriverVersion")
: id = audiodevinfo (io, rate, bits, chans)
: supports = audiodevinfo (io, id, rate, bits, chans)

Return a structure describing the available audio input and output devices.

The devinfo structure has two fields "input" and "output". The value of each field is a structure array with fields "Name", "DriverVersion" and "ID" describing an audio device.

If the optional argument io is 1, return information about input devices only. If it is 0, return information about output devices only. If io is the only argument supplied, return the number of input or output devices available.

If the optional argument id is provided, return information about the corresponding device.

If the optional argument name is provided, return the ID of the named device.

If the optional argument "DriverVersion" is given, return the name of the driver for the specified device.

Given a sampling rate, bits per sample, and number of channels for an input or output device, return the ID of the first device that supports playback or recording using the specified parameters.

If also given a device ID, return true if the device supports playback or recording using those parameters.