|
Esound (ESD) is a stand-alone sound daemon which abstracts the system
sound device to multiple clients. Under Linux using the Open Sound
System (OSS), as well as other UNIX systems, typically only one
process may open the sound device. This is not acceptable in a desktop
environment like GNOME, as it is expected that many applications will
be making sounds (music decoders, event based sounds, video
conferencing, etc). The ESD daemon connects to the sound device and
accepts connections from multiple clients, mixing the incoming audio
streams and sending the result to the sound device. Connections are
only allowed to clients which can authenticate successfully,
alleviating the concern that unauthorized users can eavesdrop via the
sound device. In addition to accepting client connections from the
local machine, ESD can be configured to accept client connections from
remote hosts which authenticate successfully.
Applications wanting to contact the ESD daemon do so using the libesd
library. Much like with file i/o, a ESD connection is first
opened. The ESD daemon will be spawned automatically by libesd if a daemon
is not already present. Data is then either read or written to the
ESD daemon. For a ESD client local to the machine which the ESD
daemon is running on, the data is transferred through a local socket,
then written to the sound device by the ESD daemon. For a client on a
remote machine, the data is sent by libesd on the remote machine over
the network to the ESD daemon. The process is completely transparent
to the application using ESD.
Figure 1. The ESD Process

|