The following example shows script-channel commands in a movie that plays compact-disc audio segments through MCI:
2 |
mci open cdaudio alias janes |
3 |
mci set janes time format tmsf; mci stop janes |
4 |
mci seek janes to 4:1:20 |
9 |
mciWait janes |
10 |
mci play janes from 4:1:20 to 4:1:23 |
12 |
mciWait janes |
20 |
mci play janes from 4:1:52 to 4:2:06 |
22 |
mciWait janes |
30 |
mci play janes from 4:2:22 to 4:2:34 |
31 |
mciWait janes |
35 |
mci play janes from 4:2:36 to 4:2:51 |
39 |
mciWait janes |
45 |
mci play janes from 4:3:53 to 4:4:07 |
46 |
mciWait janes |
60 |
mci seek janes to 11:1:22 |
64 |
mciWait janes |
65 |
mci play janes from 11:1:22 to 11:1:32 |
67 |
mciWait janes |
75 |
mci play janes from 11:1:32 to 11:2:12 |
77 |
mciWait janes |
90 |
mci play janes from 11:3:12 to 11:3:24 |
92 |
mciWait janes |
97 |
mci close janes |
The next example uses MCI to play a waveform audio file. It uses multiple MCI play commands and mciWait commands to synchronize sections of waveform audio with the appropriate movie frames.
2 |
mci open narrat\fer.wav type WaveAudio alias fer |
4 |
mci play fer from 0 to 20404 |
8 |
mciwait fer |
25 |
mci play fer from 21426 to 31579 |
121 |
mciwait fer |
123 |
mci play fer from 32700 to 37185 |
198 |
mciwait fer |
200 |
mci play fer from 38231 to 41139 |
208 |
mciwait fer |
210 |
mci play fer from 42300 to 50327 |
226 |
mciwait fer |
228 |
mci play fer from 51455 to 56923 |
261 |
mciwait fer |
262 |
mci play fer from 57631 to 62055 |
268 |
mciwait fer |
269 |
mci play fer from 63285 to 70784 |
Since this movie file does not explicitly close the “fer” device before finishing, the Movie Player will close the device when the movie file is closed.