forsyth20121205-174063a80cc13 years agoHistory
169 lines · 3.4 KB · Text
RawDownload
.TH AUDIO 3.SH NAMEaudio \- digital audio input and output.SH SYNOPSIS.B bind -a '#A' /dev.PP.B /dev/audio.br.B /dev/audioctl.SH DESCRIPTIONThe.I audiodevice serves a one-level directory containing two files,giving access to the host or native audio device in a platform-independent way..PP.B Audiois the data file, which can be read or written to exchange data with the device. Audiodata is a sequence of stereo samples, left sample first, each of which is a 16 bit little-endiantwo's complement integer..PP.B Audioctlis the associated control file, which sets the characteristics of the device.Reads return lines of the form.TP.B "\fIsource\fP [in out] \fIvalue\fP".TP.B "\fIsource\fP in \fIvalue\fP out \fIvalue\fP".TP.B "\fIsource\fP [in out] left \fIvalue\fP right \fIvalue\fP".TP.B "\fIsource\fP in left \fIvalue\fP right \fIvalue\fP out left \fIvalue\fP right \fIvalue\fP"The qualifiers.BR in ,.B outand.BR left ,.B rightare omitted if theyare not applicable or if the input/output and/or left/right values arethe same.The.I sourceis one of.BR audio ,.BR aux1 ,.BR aux2 ,.BR line ,.BR mono ,.BR mic ,.BR rate ,.B chansor.BR bits .If.I sourceis one of the ports.BR audio ,.BR aux1 ,.BR aux2 ,.BR line ,.B monoor.BR mic ,.I valuerepresentsthe volumeon a scale of 0 (quiet) to 100 (loud). The default volume is 50 for the.B audioport and 0 for theremainder. If the.I sourceis.BR rate ,.I valuerepresents therate at which the data was recorded in Hz. The default is 22050.If the.I sourceis.BR chans ,.I valueis the number of channels of audio data - 2 (the default) for stereo, otherwise mono. If the.I sourceis.BR bits ,.I valueis one of 4, 8 or 16, the sample size in bits..TP.B [in out] enc \fIformat\fPOutputs the recording format on the input and/or output channels..I Formatis one of.BR ulaw ,.BR alaw ,.BR pcm ,.B pcm16or.B adpcm.TP.B loop \fIvalue\fP.I Valueis 0 or 1 to disable or enable loopback respectively..PPWrites control the device with strings of a similar format as that for reads..TP.B "\fIsource\fP [in out] \fIvalue\fP".TP.B "\fIsource\fP in \fIvalue\fP out \fIvalue\fP".TP.B "\fIsource\fP [in out] left \fIvalue\fP right \fIvalue\fP".TP.B "\fIsource\fP in left \fIvalue\fP right \fIvalue\fP out left \fIvalue\fP right \fIvalue\fP"Set the corresponding value/volume for the particular.I source.The same conventions applyas in the read case above. The default value of.I sourceis.BR audio ..TP.B resetSet all attributes to their default value..TP.B loop \fIvalue\fPEnable (1) or disable (0) loopback mode..TP.B [in out] enc \fIformat\fPSet the recording format on the input and/or output channels to.I format..I Formatis one of.BR ulaw ,.BR alaw ,.BR pcm ,.BR adpcm ..TP.B [left right] dev \fIinput\fPSet the input source of the left and/or right ADCs..I Inputis one of.BR mic ,.BR line ,.BR aux1 ,.BR loop ..SH SOURCE.B /emu/port/devaudio*.c.br.B /emu/*/devaudio.c.br.B /os/*/devaudio.c.br.B /os/*/devcs4231.c.SH SEE ALSO.IR auplay (1).br.IR audio (6).SH BUGSThe device has not been implemented on every platform that could provide it,particularly hosted implementations..br.B /os/port/devaudio.c(a driver for the SB16) implements an older interface of broadly similar form,but using.B volumenot.BR audioctl ,and supports a subset of the commands described above..brThe device is exclusive-use and cannot mix streams from several clients.