White Paper: Esound


< Prev Contents Next >

Bit Stream

ESD will automatically sample an incoming stream from a client to the best format which is supported by the sound device. Therefore, an ESD client does not need to be concerned with the actual format it uses.

This alleviates the common problem of having to write code for each different platform which determines the possible formats available. A developer just selects a format to use and relies upon ESD to map that as best possible to the platform the application is running on.

ESD also supports recording and writing from the audio device. The API allows for different programs to be able to record and write simultaneously if your audio device is full duplex - that means the device is able to digitize analog audio input and convert digital to analog audio output at the same time. Many common sound cards are not full duplex, such as Sound Blaster cards. A device can play in 16 bits and record in 8 bits, but not play and record in 16 bits on both streams. Being able to record and play at the same bit resolution, same rate, and same number of channels is what is considered full duplex, for the purposes of this document.

In addition to streams, ESD also supports sample caching. The client can upload a sample of audio, tag it by a name, and receive an ID tag for that sample. At any point the client can ask for the sample to be freed from ESD's memory. The sample can be shared among several programs and allow instant playback of sounds, (For example, for spot effects), with no blocking of calls to the server to play long samples.

Futhermore, if the audio device of the standard Linux kernel supports mixing at the driver level, e.g, ALSA, ESD can act as a simple front-end to ALSA. This allows mixing on older kernels and non-Linux platforms, as well as mixing via the device when available.


< Prev Contents Next >