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 accomodate unique features of a particular type of device. For a complete reference to MCI command messages, see the message-directory chapter in the Programmer's Reference.

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

Audio Task   MCI Command  

Play sounds   ^  
  Play a waveform sound   MCI_SOUND
Open and close audio devices   ^  
  Open an audio device   MCI_OPEN
  Close an audio device   MCI_CLOSE
Control playback and recording   ^  
  Play all or part of audio selection, resume playback from pause   MCI_PLAY
  Stop playback   MCI_STOP
  Pause playback   MCI_PAUSE
  Change current location   MCI_SEEK
  Cue a device so playback or recording begins with minimum delay   MCI_CUE
  Begin recording on a waveform audio device   MCI_RECORD
  Save a recorded waveform audio file   MCI_SAVE
Query and set audio devices   ^  
  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_INFO
  Query device capabilities such as the device type, number of inputs and outputs (if the device can record)   MCI_GETDEVCAPS
  Query device status such as current playback position, media length, media format, time format, record level, CD audio track, MIDI sequencer tempo   MCI_STATUS
  Set device parameters such as time format, waveform data format, MIDI sequencer tempo   MCI_SET