The MCI_CUE command cues a device so that playback or recording begins with minimum delay. Digital-video, VCR, and waveform-audio devices recognize this command.
To send this command, call the mciSendCommand function with the following parameters.
MCIERROR mciSendCommand( MCIDEVICEID wDeviceID, MCI_CUE, DWORD dwFlags, (DWORD) (LPMCI_GENERIC_PARMS) lpCue );
Device identifier of the MCI device that is to receive the command message.
MCI_NOTIFY, MCI_WAIT, or, for digital-video and VCR devices, MCI_TEST. For information about these flags, see The Wait, Notify, and Test Flags.
Pointer to an MCI_GENERIC_PARMS structure. (Devices with extended command sets might replace this structure with a device-specific structure.)
Returns zero if successful or an error otherwise.
The following additional flags are used with the digitalvideo device type:
A digital-video instance should prepare for recording. If the application has not reserved disk space, the device reserves the disk space using its default parameters. The application can omit this flag if the current presentation source is already the external input. (This flag has no effect on selecting the presentation source.)
A digital-video instance should prepare for playing the frame specified with the command without displaying it. When this flag is specified, the display continues to show the image in the frame buffer even though its corresponding frame is not the current position. For example, if the frame buffer contains the image from frame 7, the device continues to show frame 7 when this flag is used to cue the device to any other position. A subsequent cue command without this flag and without the MCI_TO flag displays the current frame.
A digital-video instance should prepare for playing. If the workspace is paused, no positioning occurs. If the workspace is stopped, the position might change to a previous key-frame image. The application can omit this flag if the current presentation source is already the workspace.
A workspace position is included in the dwTo member of the structure identified by lpCue. The units assigned to position values are specified using the MCI_SET_TIME_FORMAT flag of the MCI_SET command. This is equivalent to seeking to a position, except the device is paused after the command.
For digitalvideo devices, the lpCue parameter points to an MCI_DGV_CUE_PARMS structure.
The following additional flags are used with the vcr device type:
The dwFrom member of the structure pointed to by lpCue contains the starting location specified in the current time format.
The dwTo member of the structure pointed to by lpCue contains the ending (pausing) location specified in the current time format.
Prepare for recording.
Prepare for playing. If neither MCI_VCR_CUE_INPUT nor MCI_VCR_CUE_OUTPUT is specified, MCI_VCR_CUE_OUTPUT is assumed.
Cue the device to the current position, or the dwFrom position, minus the preroll duration. This will allow the device to prepare itself before entering record or playback mode.
The direction of the next play or record command is reverse.
When cueing for playback by using the MCI_CUE command with the MCI_VCR_CUE_OUTPUT flag, you can cancel MCI_CUE by issuing the MCI_PLAY command with MCI_FROM, MCI_TO, or MCI_VCR_PLAY_REVERSE.
When cueing for recording by using MCI_CUE with the MCI_VCR_CUE_INPUT flag, you can cancel MCI_CUE by issuing the MCI_RECORD command with MCI_FROM, MCI_TO, or MCI_VCR_RECORD_INITIALIZE.
For vcr devices, the lpCue parameter points to an MCI_VCR_CUE_PARMS structure.
The following additional flags are used with the waveaudio device type:
A waveform-audio input device should be cued.
A waveform-audio output device should be cued. This is the default flag if a flag is not specified.
** Windows NT/2000/XP:** Included in Windows NT 3.1 and later.
** Windows 95/98/Me:** Included in Windows 95 and later.
** Header:** Declared in Mmsystem.h; include Windows.h.