.TH ASW 1carl CARL
.SH NAME
libasw \- audio switch daemon library routines
.SH SYNOPSIS
.nf
.B int openasw()
.B int closeasw(fd)
.B int fd;
.PP
.B char *connasw(name, chans)
.B char *name;
.B short *chans;
.PP
.B char *disconnasw()
.PP
.B char *resetasw()
.fi
.SH DESCRIPTION
.PP
These routines are the C interface to the CARL
audio switch daemon.
All routines, except for
.B openasw
and
.B closeasw,
return a status message from the daemon.
The string ``ok'' means that the connection was
successfully made; other strings are error messages.
.PP
.B openasw
returns -1 on error or a socket descriptor upon
success.
.B closeasw
is used to shutdown the socket returned by
.B openasw.
It returns -1 on error or 0 upon success.
Both
.B openasw
and
.B closeasw
are called automatically by all of the other routines
and normally isn't needed; they are provided for users
that are doing unnatural things and need to send
messages to the daemon directly.
.PP
.B connasw
takes two arguments. The first is the name of
the device to connect to, the second is a list
of channels to connect. These channels of the
output device are connected to your space.
.PP
.B disconnasw
takes no arguments. It breaks all connections to
your space.
.PP
.B resetasw
takes no arguments. It breaks all connections to
all spaces.
.PP
The audio switch daemon at CARL is configured so that
each terminal corresponds to an input space; the terminal
name is used for the symbolic name of that input space.
At CARL we also have some SUN workstations. For their
symbolic name their network machine name is used.
The routines
.B connasw
and
.B disconnasw
call a internal routine that determines the symbolic
name of your input space by looking in the
.I /etc/utmp
file.
.SH AUTHOR
Rusty Wright
.SH SEE ALSO
asw(C), aswdaemon(C)
