Notice! This is not the actual class documentation. This page is a collection of design notes and thoughts. I've noticed that by trying to write a good class description (roles, interface, use), you quickly find out about possible desing flaws.
A CHAIN represents a single signal flow abstraction. Every CHAIN has one slot for an audio input device and one slot for output. Because these device objects are unique and can be assigned to multiple chains, id numbers are used to refer to the actual device objects. In addition, CHAIN has a name, a SAMPLE_BUFFER object and a vector of CHAINOPs which operate on the sample data.
1.1.2 ECA_PROCESSOR - eca-main.{cpp,h}
This class is the actual processing engine. It is initialized with a pointer to an ECA_SESSION object, which has all information needed at runtime. Processing is started with a start command and after that, ECA_PROCESSOR runs on its own. If the interactive mode is enabled in ECA_SESSION, ECA_PROCESSOR can be controlled from other threads. The simplest way is to use the ECA_CONTROLLER class. It offers a safe way to control ecasound using string commands. It should be used when the command isn't used continuously. The other way to communicate with ECA_PROCESSOR is to access the ECA_SESSION object directly. For this to work, mutex locking must be used. This for instance makes possible to monitor signal volume in realtime.
A session contains all ECA_CHAINSETUP objects and general runtime settings (iactive-mode, debug-level, etc). Only one ECA_CHAINSETUP can be active at a time.
ECA_CHAINSETUP represents a group of CHAINs and info about how they are connected. ECA_CHAINSETUP can be constructed from a COMMAND_LINE object or it can be loaded from a ascii file. It's also possible to save a ECA_CHAINSETUP to a simple ascii. The syntax is identical to command line syntax.
This class is an interface to the ~/.ecasouncrc configuration file.
Represents the interactive mode of ecasound. It takes string commands and inteprets them. Then it either performs the task itself or passes the command to the engine (ECA_PROCESSOR). In some rare cases (likes for instance when quitting ecasound) it throws an exception.
1.1.7 SAMPLE_BUFFER - samplebuffer.{cpp,h}
Basic unit for representing sample data. The data type used to represent a single sample, value range, channel count, sampling rate and system endianess are all specified in "samplebuffer.h".
AUDIO_IO_DEVICE is a virtual base class for all audio io-devices. Audio devices can be opened in the following modes: read, write or read_write. Input and output routines take pointers to SAMPLE_BUFFER objects as their arguments. All devices are either non-realtime (normal files) or realtime (soundcards). Realtime means that once device is started, data input/output doesn't depend on calls to AUDIO_IO_DEVICE object. With non-realtime devices, input and output is done only when requested. Due to performance issues, much of the responsibility is given to the user of these classes. It's not impossible to write to an object opened for reading (probably with disastrous results).
All the necessary information about signal flow is found from CHAIN objects. Currently signals can't be redirected from one chain to another. You can still assing inputs and outputs to multiple chains.