Sharing the Amplifier-Mixer Device

Because many components of OS/2 multimedia utilize the amplifier-mixer device, it is typically opened shareable so that several devices can use the ampmix device simultaneously, or serially, in an application-window-focus driven sharing scheme. The Media Device Manager (MDM) is responsible for allocating the resources of the underlying hardware correctly and informs an application with the MM_MCIPASSDEVICE message whenever use of the ampmix device is gained or lost.

When other media devices in an application use the ampmix device, the amplifier-mixer becomes a source of contention, depending on the capabilities of the underlying audio adapter. For example, the IBM M-Audio adapter supports the simultaneous playback of two mono 22 kHz PCM waveforms. However, if a third waveform is started, one of the previous two waveforms must be suspended. The application that opened the waveform audio (waveaudio) device receives a MM_MCIPASSDEVICE message with an event of MCI_LOSING_USE. Following completion of the third waveform, the second waveform is automatically restored and can then play to completion. See Device Sharing By Applications for information on device sharing.

The OS/2 multimedia system manages all device sharing, and informs the application when the device is temporarily unavailable.


[Back: The Amp Stream Connector]
[Next: Audio Attributes]