Distributed audio under Linux
- Student: Daniel Warren (2004), now at Ashland Inc. in Lexington, KY.
- Purpose: Design and implement a daemon that lets clients create
multichannel audio streams and add/remove sources and sinks, which can be tied
to files, hardware devices (such as microphones, CD players, and speakers), and
other instances of the daemon.
- Method:
Alsad listens on a well-known port for clients to connect. It spawns
a new thread for each client. It dedicates a circular buffer to each stream.
It spawns a new thread for each sink.
It periodically grants permission to the source to send more data as the sinks
consume the data from the buffer. A client program takes command-line
parameters to specify commands that it then sends to alsad.
- What the student learned
- Tools: Alsa library, threads (including thread synchronization), doxygen
- Language: C
- Techniques: Client-server protocols, design and documentation of a
large-scale project
Code and documentation can be found at
this site.