The following examples show some of the commands used to control a variety of MCI devices. The examples assume that the WIN.INI and SYSTEM.INI files reflect the proper operating environment for the devices and the sample files are in the \WINDOWS\MMDATA directory.
You can use MCITEST to play digital audio data files. To open the file TRAIN.WAV enter:
open \windows\mmdata\train.wav type waveaudio alias sounds
Then, to hear the file, enter:
play sounds
If your audio card is configured properly and your volume is on, you will hear the a train.
If you wish to replay the file, enter:
play sounds from 0
The flag “from 0” resets the file pointer to the start of the file.
Close the file with:
close sounds
You can play a compact audio disc with the cdaudio device and the following script:
open cdaudio
play cdaudio
stop cdaudio
close cdaudio
As a last example you can use the sequencer to play MIDI files with the following script:
open \windows\mmdata\canyon.mid type sequencer alias song
play song wait
close song
If you wish to replay the song before closing the device, enter the command “play song from 0.” If you wish to hear the song at a different speed, enter the command “set song tempo 200” before playing the song.
When you are finished using MCITEST, close all the MCI devices you opened before exiting. Closing an application with open MCI devices can make those devices unaccessible to other applications until the system is rebooted.