| Directives |
|
| Format | MULTI_MEDIA command$[,var$[,ctl_val]] Where: |
||||
| command$ | String containing the multi-media command to execute. String expression. | ||||
| ctl_val | String variable to receive any response or error message. | ||||
| var$ | Optional CTL code to be generated when a NOTIFY signal is returned by the multimedia system. Numeric expression. | ||||
| *Note* | This directive only functions under WindX or Windows. | ||||
| Description | Use the MULTI_MEDIA directive to pass commands to the Windows Multimedia Control Interface (MCI). These strings can contain commands that will play WAV files, MID files, AVI files or control various multi-media devices. Typical commands include: |
||||
| Command | Function/Purpose | ||||
| open filename | Opens the specified file and loads the required drivers. You can append an optional 'alias name' to change the name of the file and make controlling the file easier. | ||||
| close filename | Closes the specified files and releases the drivers. | ||||
| close all | Stops and closes all files. | ||||
| play filename | Plays the specified file. The file will be opened (if not already opened), played, and closed automatically. | ||||
| rewind filename | Rewinds the file. | ||||
| stop filename | Stops the playback. | ||||
| Examples | The following examples illustrate the different uses for the MULTI_MEDIA directive. Example 1: MULTI_MEDIA "open c:\video\files\emo.avi alias video" Example 2: 0010 ! Close all previous Multi_media commands for this session 0020 MULTI_MEDIA "close all" 0030 ! 0040 ! Assign an Alias to the Wave file for use in the Play command 0050 MULTI_MEDIA "open c:\windows\media\ada.wav alias wavefile" 0060 ! 0070 ! Issue the Play command requesting notification of a CTL=100 0080 ! after the wave file has finished 0090 MULTI_MEDIA "play wavefile notify",100 0100 ! 0110 ! Wait for the CTL=100 0120 OBTAIN X$ 0130 IF CTL=4 THEN STOP 0140 IF CTL<>100 THEN GOTO 0110 0150 PRINT "Multi_media command finished" Future references to the file could simply use the alias. Two options can be appended to the play command: |
||||
| NOTIFY | send the CTL value when completed. | ||||
| WAIT | wait for the playback to complete. | ||||
| If an error occurs during processing, it will be returned in the return$ variable. |
|||||
| *Note* | Full documentation of all available MCI commands is beyond the scope of this manual. Refer to other (Microsoft) sources for complete documentation on the MCI system. | ||||