next up previous contents
Next: The Server Data Structures Up: Developer's Guide Previous: How to Contribute   Contents

Overview of Peep's Internals

Note: Much has changed with the advent of the 0.5.0 release. This release is a complete rewrite of the server code. Rereading this documentation should quickly get anyone up to speed.

The inner workings of peepd are based upon the interactions of three execution threads: the server, the sound engine, and the mixer. The server part handles all communications, including auto-discovery and keeping track of client leases when using UDP. Upon receipt of an event, the server places the event into a queue to be processed by the sound engine. The engine works closely in conjunction with the mixer to keep track of the priority of incoming and currently playing sounds. The engine also tries to find the best available mixing channel on which to play the incoming events and informs the mixer of the necessary parameters to properly represent the information. Should a suitable mixing channel not be found, the engine will place the events into a priority queue, ensuring that the mixer will play the most important events as soon as mixing channels free up. The mixer performs the processing necessary to produce Peep's output. This process involves scaling each sound's volume, as well as fading between state sounds. The mixer must also check the engine's event queue and ensure that queued, older events have priority as soon as mixing channels free up.

A high level illustration of Peep's internals are shown below.

Each file in the Peep server has the following functions:

The next few sections aim to provide a general idea of how the code is structured and make an introduction into the project easier. These sections will probably need to be refined over time, with detail added, so if you have any suggestions or pieces of crucial information you felt were missing, please send suggestions!


next up previous contents
Next: The Server Data Structures Up: Developer's Guide Previous: How to Contribute   Contents
Collin Starkweather 2002-11-03