[ Previous | Next | Contents | Glossary | Home | Search ]
Ultimedia Services Version 2 for AIX: User's Guide

Chapter 10. Output Mixer

Ultimedia Services supports the mixing of multiple playback streams, which means that more than one application can play audio at the same time. Each application's audio "stream" can be captured by the UMS Output Mixer, mixed together, and then played through the audio device. Without the Output Mixer, when one application is playing audio, the audio device is unavailable to other audio devices for playback.

The Output Mixer does not have a graphical interface; the audio mixing is done in a transparent fashion. Applications written with the standard UMS Object interface will continue to work with the Output Mixer without needing to be re-compiled.

If you wish to use the Output Mixer to mix multiple playback streams, you need to change the UMS configuration file .UMS_config. In the Audio stanza, set the entry Mixable_Device to true. This causes any audio applications to use the Output Mixer for playback. Playback streams from multiple applications and/or multiple streams from a single application (see note for programmer's below) are mixed together and played back as a single stream. The default value for Mixable_Device is false (no mixing).

Note: To play multiple streams simultaneously from a single application, create an Audio Device object for each stream. These individual objects are recognized as different streams by the Output Mixer.

There is a practical limit to the number of streams that can be mixed. This limit depends on the performance characteristics of your individual machine and its software environment.

The audio output mixing is performed in software by a program named mixerd, which is located in $UMSDIR/bin. The Output Mixer is invoked automatically when the first mixing application begins to play audio. It also exits automatically when the last client (application that is playing audio) exits. To avoid slowing the performance of your system by starting up the mixer process at the same time the application initializes, start the the Output Mixer in advance. The executable (mixerd) takes as command line arguments the audio device, the audio device class name, and a flag signifying that the server stays up regardless of whether any clients are active:

mixerd <audio_dev> <audio_object_class_name> 1

When the Output Mixer is active, clients that do not request mixing cannot access the audio device. Also, when applications that do not request mixing are active, the Output Mixer does not have access to the device.


[ Previous | Next | Contents | Glossary | Home | Search ]