NAME
audio – audio device |
SYNOPSIS
bind –a #A /dev /dev/audio /dev/audioctl /dev/audiostat /dev/volume |
DESCRIPTION
The audio device serves a one–level directory, giving access to
the stereo audio ports. Audio is the data file, which can be written
for audio playback. Audio data is a sequence of stereo samples,
left sample first. Each sample is a 16 bit little–endian two's
complement integer; the default sampling rate is 44.1 kHz. The length of the audio file as returned by stat(2) represents the number of bytes buffered for output. Audioctl is driver specific control file and left undocumented here. Audiostat is a read only status file. The first line has a length of 32 bytes including the newline and starts with the string bufsize followed by the preferred write unit (in bytes) and the string buffered followed by the number of bytes currently queued for output. The numbers are decimal and right–padded with spaces to fit. After this fixed header, the content of the file is driver–specific.
Volume is the control file associated with the audio port. Each
source has an associated stereo volume control, ranging from 0
(quiet) to 100 (loud). In addition, there are controls for the
sampling rate, latency control and for any tone controls. Reads
return lines of the form
Writes accept the same format except that for stereo sources left
and right can be abbreviated to a single value if both should
be set the same. |
SOURCE
/sys/src/9/port/devaudio.c |
SEE ALSO
nusb(4) |