This section describes the use of the media control interface layer of the OS/2 multimedia system to manipulate devices in a hardware-independent manner. The Duet sample programs (DUET1 and DUET2) illustrate the OS/2 multimedia concept of device grouping and integrating multimedia into an application's help information. See the example in the Duet Player IPF Sample section for an example of how multimedia can be used in an application's help information.
The Duet sample programs communicate with the media control interface subsystem to control multimedia devices from an application in a device-independent manner. This concept is illustrated by the Duet samples when they play, pause, resume, stop, and change the volume of their songs. This function is implemented using the procedural interface, as opposed to the string interface described in the MCISTRNG - Media Control Interface String Test Sample.
The Duet sample applications are identical except for minor software differences in how the hardware devices are controlled. DUET1 plays both parts of the duet on a streaming device-a device that streams data through the SPI subsystem of OS/2 multimedia. DUET2 groups a streaming and a non-streaming device-a device that handles data internally and does not stream data through the SPI subsystem.
The hardware differences between the Duet samples have little impact on the applications. The media drivers and stream handlers manage the hardware-dependent function.
Note: To hear the duets when you run the Duet sample programs, an audio device is required, for example, the M-Audio adapter. If you do not have an audio adapter, you can still compile and run the sample programs; however, you will not be able to play any duets or audio help.