cue command

The cue command prepares for playing or recording. Digital-video, VCR, and waveform-audio devices recognize this command.

To send this command, call the mciSendString function with the lpszCommand parameter set as follows.


_stprintf_s(
  lpszCommand, 
  TEXT("cue %s %s %s"), 
  lpszDeviceID, 
  lpszInOutTo, 
  lpszFlags
); 

Parameters

lpszDeviceID

Identifier of an MCI device. This identifier or alias is assigned when the device is opened.

lpszInOutTo

Flag that prepares a device for playing or recording. The following table lists device types that recognize the cue command and the flags used by each type.

ValueCueCue
digitalvideo
  • input
  • noshow
  • output
  • to position
vcr
  • from position
  • input
  • output
  • preroll
  • reverse
  • to position
waveaudioinputoutput

 

The following table lists the flags that can be specified in the lpszInOutTo parameter and their meanings.

ValueMeaning
from positionIndicates where to start.
inputPrepares for recording. For digital-video devices, this flag can be omitted if the current presentation source is already the external input.
noshowPrepares for playing a frame 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. A subsequent cue command without this flag and without the "to" flag displays the current frame.
outputPrepares for playing. If neither "input" nor "output" is specified, the default setting is "output".
prerollMoves the preroll distance from the in-point. The in-point is the current position, or the position specified by the "from" flag.
reverseIndicates play direction is in reverse (backward).
to positionMoves the workspace to the specified position. For VCR devices, this flag indicates where to stop.

 

lpszFlags

Can be "wait", "notify", or both. For digital-video and VCR devices, "test" can also be specified. For more information about these flags, see The Wait, Notify, and Test Flags.

Return Value

Returns zero if successful or an error otherwise.

Remarks

Although it is not necessary, issuing the cue command before playing or recording on some devices might reduce the delay before the device starts the action.

This command fails if playing or recording is in progress or if the device is paused.

When cueing for playback (using cue "output"), issuing the play command with the "from", "to", or "reverse" flag cancels the cue command.

When cueing for recording (using cue "input"), issuing the record command with the "from", "to", or "initialize" flag cancels the cue command.

Examples

The following command prepares the "mysound" device for recording.

cue mysound input

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

See also

MCI
MCI Command Strings
play
record

 

 

Show: