79.3.2 MCI Audio Commands

MCI provides a standard set of commands applying to all types of media devices. Some of these commands can be extended to accommodate unique features of a particular type of device. For a complete reference to MCI command messages, see the message-directory chapter in the Multimedia Programmer's Reference.

The following table lists common audio playback and recording tasks along with the corresponding MCI command message to perform each task:

MCI Command Audio Task

MCI_OPEN Open an audio device
MCI_CLOSE Close an audio device
MCI_PLAY Play all or part of audio selection, resume playback from pause
MCI_STOP Stop playback
MCI_PAUSE Pause playback
MCI_SEEK Change current location
MCI_CUE Cue a device so playback or recording begins with minimum delay
MCI_RECORD Begin recording on a waveform audio device
MCI_SAVE Save a recorded waveform audio file
MCI_INFO Query device information such as the product name and the name of the device element currently associated with the device (returns information in string format)
MCI_GETDEVCAPS Query device capabilities such as the device name, number of inputs and outputs (if the device can record)
MCI_STATUS Query device status such as current playback position, media length, media format, time format, record level, CD audio track, MIDI sequencer tempo
MCI_SET Set device parameters such as time format, waveform data format, MIDI sequencer tempo