Using the Media Control InterfaceClarion for Windows Tips
|
| Command | Description |
break |
Set up key to break MCI action |
sysinfo |
Gets MCI system informationsysinfo all quantity |
Required commands must be implemented for every
device. Each device must also support a defined set of
options for each command. The required commands are capability,
close, info, open
and status.
| Command | Description |
capability |
Gets information about device capabilitiescapability cdaudio can eject |
close |
Closes an open deviceclose all |
info |
Gets information about the device driverinfo cdaudio product |
open |
Opens and initializes a deviceopen cdaudio |
status |
Gets device statusstatus cdaudio mode |
Basic commands are device control commands that
are may or may not be implemented depending on the
device. The commands that are implemented must support a
standard set of options for that command. The basic
commands are load, pause, play,
record, resume, save,
seek, set, status
and stop.
| Command | Description |
load |
Loads a device file from disk |
pause |
Pauses playing or recordingpause cdaudio |
play |
Starts playing the deviceplay cdaudio |
record |
Starts recording data with the devicerecord waveaudio |
resume |
Resumes playing or recording after pause |
save |
Save a device file to disksave waveaudio c:\temp\newsound.wav |
seek |
Moves to a specified position for the deviceseek cdaudio to start |
set |
Updates device control settingsset cdaudio door open |
status |
Gets device statusstatus cdaudio current track |
stop |
Stops playing or recordingstop cdaudio |
Extended commands are additional commands that may be implemented for a specific device or that extended that options on a required or basic command. Examples of extended commands are delete and spin. Delete is used to delete a section of a wave audio file. Spin is used to start or stop spinning on a videodisc device. These commands are implemented only for the devices they apply to.
Two API functions are involved when using MCI command strings: mciSendString and mciGetErrorString. The functions are prototyped and used in the Media Control Interface Tester sample program. This program allows the user to enter and execute an MCI command string. The program provides a way to test the result of various MCI command strings.
The program includes some sample MIDI files for testing. You can use these along with other multimedia files on your system to test some of the following command strings and see their results.
To test the wave audio device on your system, try:
open c:\win95\media\chimes.wav type waveaudio play c:\win95\media\chimes.wav close c:\win95\media\chimes.wav open c:\win95\media\chimes.wav type waveaudio alias chimes play chimes close chimes open waveaudio!c:\win95\media\chimes.wav alias chimes play chimes close chimes
To test the MIDI sequencer on your system, try:
open sequencer!canada.mid alias anthem play anthem pause anthem resume anthem stop anthem seek anthem to start play anthem stop anthem close anthem
To test the CD drive on your system, try:
open cdaudio play cdaudio set cdaudio time format tmsf play cdaudio from 3 to 4 close cdaudio
If you do much work with the MCI system, you will probably want to obtain a Windows API reference so that you have full documentation for the MCI command structure. For basic MCI work, you now have to tools needed to integrate the media control interface and its capabilities into your Clarion programs.
Copyright © 1997-1999 - The Computer Guy - steve@compguy.com
Last updated Thursday, December 16, 1999