Playing and Recording Audio Using MCI

The Media Control Interface (MCI) provides a high-level interface for controlling both internal and external media devices. MCI provides support for playing wave-form, MIDI, and compact disc audio and for recording waveform audio. MCI is the easiest way for multimedia applications to play and record audio.

MCI uses device drivers to interpret and execute high-level MCI commands. MCI device drivers can stream digital audio and MIDI data directly from a storage device to the appropriate device driver, allowing applications to play files too large to fit in available physical memory. This data streaming takes place in the back-ground while an application is running. The application is responsible only for setting up MCI and telling it to start playing or recording.

Before reading this section, you should become acquainted with MCI by reading Chapter 2, “The Media Control Interface (MCI).” MCI provides two types of interfaces: a command-message interface and a command-string interface. This section explains how to use the command-message interface for waveform, MIDI, and compact disc audio devices. See the MCI chapter for information about the command-string interface.