status
The status
command requests status information from a device. All devices recognize this
command.
wsprintf(lpstrCommand, "status %s %s %s",
lpszDeviceID, lpszRequest,
lpszFlags);
Parameters
lpszDeviceID
Identifier of
an MCI device. This identifier or alias is assigned when the device is opened.
lpszRequest
Flag for
requesting status information. The following table lists device types that
recognize the status command and the flags used by each type:
cdaudio |
cdaudio
type track number |
number of
tracks |
digitalvideo |
audio |
output |
overlay |
media
present |
ready |
sequencer |
current
track |
port |
vcr |
assemble
record |
pause timeout |
videodisc |
current
track |
number of
tracks |
waveaudio |
alignment |
media
present |
The following
table lists the flags that can be specified in the lpszRequest parameter
and their meanings:
alignment |
Returns the
block alignment of data, in bytes. |
assemble
record |
Returns
TRUE if the device is set to assemble mode recording. |
audio |
Returns
on or off depending on the most recent setaudio |
audio
alignment |
Returns the
alignment of data blocks relative to the start of input waveform-audio data. |
audio
bitspersample |
Returns the
number of bits per sample the device uses for recording. This flag applies
only to devices supporting the pcm algorithm. |
audio
breaks |
Returns the
number of times the audio portion of the last AVI sequence broke up. The
system counts an audio break whenever it attempts to write audio data to the
device driver and discovers that the driver has already played all of the
available data. This flag is recognized only by the MCIAVI digital-video
driver. It is meant for performance evaluation only; the return value is
difficult to interpret. |
audio
bytespersec |
Returns the
average number of bytes per second used for recording. |
audio input |
Returns the
approximate instantaneous audio level of the analog input audio signal. A
value greater than 1000 implies clipping distortion. Some devices can return
this value only while recording audio. The value has no associated set |
audio
monitor |
Returns
output , or one of the valid source-input types. For more information, see
the setaudio monitor command. |
audio
monitor number |
Returns the
monitored-video number of the type specified by status audio
monitor . For more information, see the setaudio |
audio
record |
Returns
on or off , reflecting the state set by setaudio record . |
audio
record track number |
Returns
TRUE if the VCR is set to record audio. If no track number is given, the
default value of 1 is assumed. |
audio
samplespersec |
Returns the
number of samples per second recorded. |
audio
source |
Returns the
current audio digitizer source: left , right , average , or stereo . |
audio
source number |
Returns the
audio-source number of the type returned by status audio source . For
more information, see the setaudio |
audio
stream |
Returns the
current audio-stream number. |
bass |
Returns the
current audio-bass level. |
bitsperpel |
Returns the
number of bits per pixel for saving captured or recorded data. |
bitspersample |
Returns the
bits per sample. |
brightness |
Returns the
current video-brightness level. |
bytespersec |
Returns the
average number of bytes per second played or recorded. |
cdaudio
type track number |
Returns the
type of the specified track number. This can be audio or other. |
channel |
Returns the
integer value of the channel set on the tuner. |
channel
tuner number |
If tuner number
is given, then the currently selected channel on the logical tuner number
will be returned. Note that there can be several logical tuners. |
channels |
Returns the
number of channels set (1 for mono, 2 for stereo). |
clock |
Returns the
external time. The time must be an unsigned long integer expressing total
increments. For more information, see the capability |
clock id |
Returns a
unique integer identifying the clock. |
color |
Returns the
current color level. |
contrast |
Returns the
current contrast level. |
counter |
Returns the
counter position, in the current counter format. |
counter
format |
Returns the
current counter format. For more information, see the set |
counter
resolution |
Returns
frames or seconds , indicating the counter s resolution. This is not the
same as accuracy. |
current
track |
Returns the
current track. The MCISEQ sequencer returns 1. |
disc size |
Returns
either 8 or 12, indicating the size of the loaded disc in inches. |
disk space drive |
Returns the
approximate disk space, in the current time format, that can be obtained by a
reserve |
division
type |
Returns one
of the following file division types: PPQN Use this
information to determine the format of the MIDI file and the meaning of tempo
and position information. |
file
completion |
Returns the
estimated percentage a load |
file format
|
Returns the
current file format for record |
file mode |
Returns
loading , saving , editing , or idle . During a load.B61Q3, copyUD.RPK, delete33RM_.P, paste4O6AK1, or undo operations, it returns
editing . |
format tag |
Returns the
format tag. |
forward |
Returns
TRUE if the play direction is forward or if the device is not playing. |
frame rate |
Returns the
number of frames per second that the device will use by default. NTSC devices
return 30, PAL 25, and so on. |
frames
skipped |
Returns the
number of frames that were not drawn when the last AVI sequence was played.
This flag is recognized only by the MCIAVI digital-video driver. It is meant
for performance evaluation only; the return value is difficult to interpret. |
gamma |
Returns the
value set with setvideo |
index |
Returns the
current index display. For more information, see the set |
index on |
Returns
TRUE if the index is on. |
input |
Returns the
input set. If one is not set, the error returned indicates that any device
can be used. For
digital-video devices, modifies the bass , treble , volume , brightness ,
color , contrast , gamma , sharpness , or tint flag so that it applies
only to the input. This is the default when monitoring the input. |
left volume |
Returns the
volume set for the left audio channel. |
length |
Returns the
total length of the media, in the current time format. For PPQN
files, the length is returned in song pointer units. For SMPTE files, it is
returned as hh:mm:ss:ff, where hh is
hours, mm is minutes, ss is seconds, and ff is frames.
For VCR devices, the length is 2 hours (unless the length has been explicitly
changed using the set |
length
track number |
Returns the
length of the track, in time or frames, specified by number. For PPQN
files, the length is returned in song pointer units. For SMPTE files, it is
returned as hh:mm:ss:ff, where hh is hours,
mm is minutes, ss is seconds, and ff is frames. |
level |
Returns the
current PCM audio sample value. |
master |
Returns
midi , none , or smpte depending on the type of synchronization set. |
media
present |
Returns
TRUE if the media is inserted in the device or FALSE otherwise. Sequencer,
video-overlay, digital-video, and waveform-audio devices return TRUE. |
media type |
Returns the
type of the media. For VCRS, this is 8mm , vhs , svhs , beta , Hi8 ,
edbeta , or other . For videodiscs, this is CAV , CLV , or other ,
depending on the type of videodisc. |
mode |
Returns the
current mode of the device. All devices can return the not ready , paused ,
playing , and stopped values. Some devices can return the additional
open , parked , recording , and seeking values. |
monitor |
Returns
file or input . The returned value indicates the current presentation
source. |
monitor
method |
Returns
pre , post , or direct . The returned value indicates the method used for
input monitoring. |
nominal |
The item modifies
the bass , brightness , color , contrast , gamma , sharpness , tint ,
treble, and volume flags to return the nominal value instead of the
current setting. |
nominal
frame rate |
Returns the
nominal frame rate associated with the file. The units are in frames per
second multiplied by 1000. |
nominal
record frame rate |
Returns the
nominal frame rate associated with the input video signal. The units are in
frames per second multiplied by 1000. |
number of
audio tracks |
Returns the
number of audio tracks on the media. |
number of
tracks |
Returns the
number of tracks on the media. The MCISEQ and MCIWAVE devices return 1, as do
most VCR devices. The MCIPIONR device does not support this flag. |
number of
video tracks |
Returns the
number of video tracks on the media. |
offset |
Returns the
offset of a SMPTE-based file. The offset is the start time of a SMPTE-based
sequence. The time is returned as hh:mm:ss:ff,
where hh is hours, mm is minutes, ss is seconds, and ff
is frames. |
output |
Returns the
currently set output. If no output is set, the error returned indicates that
any device can be used. For
digital-video devices, modifies the bass , treble , volume , brightness ,
color , contrast , gamma , sharpness , or tint flag so that it applies
only to the output. This is the default when monitoring a file. |
pause mode |
Returns
recording if the device is paused while recording. It returns playing if
the device is paused while playing. It returns the error Action not
applicable in current mode if the device is not paused. |
pause
timeout |
Returns the
maximum duration, in milliseconds, of a pause |
play format |
Returns a
code indicating the format that the videotape will be played back in, if
detectable: lp , ep , sp , or other . For more information, see the
record format flag. |
play speed |
Returns a
value representing how closely the actual playing time of the last AVI
sequence matched the target playing time. The value 1000 indicates that the
target time and the actual time were the same. A value of 2000, for example,
would indicate that the AVI sequence took twice as long to play as it should
have. This flag is recognized only by the MCIAVI digital-video driver. It is
meant for performance evaluation only; the return value is difficult to
interpret. |
port |
Returns the
MIDI port number assigned to the sequence. |
position |
Returns the
current position. For PPQN
files, the position is returned in song pointer units. For SMPTE files, it is
returned as hh:mm:ss:ff, where hh is
hours, mm is minutes, ss is seconds, and ff is frames. |
position
start |
Returns the
position of the start of the usable media. |
position track
number |
Returns the
position of the start of the track specified by number. For PPQN
files, the time format is returned in song pointer units. For SMPTE files, it
is returned as hh:mm:ss:ff, where hh is
hours, mm is minutes, ss is seconds, and ff is frames.
The MCISEQ sequencer returns zero. The MCIPIONR device does not support this
flag. The MCIWAVE device returns zero. |
postroll duration |
Returns the
length of videotape, in the current time format, needed to brake the VCR
transport when a stop |
power on |
Returns
TRUE if the VCR s power is on. |
preroll
duration |
Returns the
length of videotape, in the current time format, needed to stabilize the VCR
output. |
ready |
Returns
TRUE if the device is ready to accept another command. |
record
format |
Returns a
code indicating the format that the videotape will be recorded in. The
current return types are lp , ep , sp , or other . These formats are not
VHS specific and can be applied to any VCR that has multiple selectable
recording formats. The sp type is the fastest, highest quality recording
format and is used as default on single format VCRs. |
record
frame rate |
Returns the
frame rate, in frames per second multiplied by 1000, used for compression. |
reference frame |
Returns the
frame number for the nearest key frame image that precedes the specified frame. |
reserved
size |
Returns the
size, in the current time format, of the reserved workspace. The size
corresponds to the approximate time it would take to play the compressed data
from a full workspace. It returns zero if there is no reserved disk space.
This flag returns the approximate size because the precise disk space for
compressed data cannot, in general, be predicted until after the data has
been compressed. |
right
volume |
Returns the
volume set for the right audio channel. |
samplespersec |
Returns the
number of samples per second played or recorded. |
seek
exactly |
Returns
on or off , indicating whether or not the seek exactly flag is set. |
sharpness |
Returns the
current sharpness level of the device. |
side |
Returns 1
or 2 to indicate which side of the videodisc is loaded. |
slave |
Returns
file , midi , none , or smpte depending on the type of synchronization
set. |
smpte |
Returns the
SMPTE timecode associated with the current position in the workspace. This is
a string with the form dd:dd:dd:dd, where each d
denotes a digit from 0 to 9. If the workspace data does not include timecode
data, then this flag returns 00:00:00:00. |
speed |
Returns the
current speed of the device in frames per second (or in the same format used
by the set |
start
position |
Returns the
starting position of the media. |
still file
format |
Returns the
current file format for the capture |
stretch |
Returns
TRUE if stretching is enabled. |
tempo |
Returns the
current tempo of a MIDI sequence in the current time format. For files with
PPQN format, the tempo is in beats per minute. For files with SMPTE format,
the tempo is in frames per second. |
time format |
Returns the
current time format. For more information, see the time formats in the set |
time mode |
Returns the
current position time mode. It can be detect , timecode , or counter . |
time type |
Returns the
current position time in use: timecode or counter . |
timecode
present |
Returns
TRUE if timecode has been recorded at the current position on the tape. The
timecode must advance from the current position. A VCR might need to be
played to check this condition. |
timecode
record |
Returns
TRUE if the VCR is set to record timecode. |
timecode
type |
Returns
smpte , smpte drop , other , or none . Note the frames per second can be
obtained from the status frame rate command, and the accuracy of the
device can be returned by the capability |
tint |
Returns the
current video-tint level. |
treble |
Returns the
current audio-treble level. |
tuner
number |
Returns the
current logical-tuner number. |
unsaved |
Returns
TRUE if there is recorded data in the workspace that might be lost as a
result of a close |
video |
Returns
on or off , reflecting the state set by the setvideo |
video key
color |
Returns the
value for the key color. |
video key
index |
Returns the
value for the key index. |
video
monitor |
Returns
output or one of the valid source-input types. For more information, see
the setvideo |
video
monitor number |
Returns the
monitored-video number of the type returned by status video monitor .
For more information, see the setvideo command. |
video
record |
Returns
on or off , reflecting the current state set by setvideo |
video
record track number |
Return TRUE
if the VCR is set to record video. If no track number is given, the default
value of 1 is assumed. |
video
source |
Returns the
video-source type. For more information, see the setvideo |
video
source number |
Returns a
number corresponding to the video source of the type in use. For example, it
returns 2 if the second NTSC video source input is being used. |
video
stream |
Returns the
current video-stream number. |
volume |
Returns the
average volume to the left and right speaker. This returns an error if the
device has not been played or volume has not been set. |
window
handle |
Returns ASCII
decimal value for the window handle in the low-order word of the return
value. |
window
maximized |
Returns
TRUE if the window is maximized. |
window
minimized |
Returns
TRUE if the window is minimized. |
window
visible |
Returns
TRUE if the window is not hidden. |
write
protected |
Returns
TRUE if the device detects that it cannot record (that is, if the write protect
is on). If it can record, or if it is unable to determine whether or not it
can record (without actually writing), the driver returns FALSE. |
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 Values
Returns
information in the lpstrReturnString parameter of mciSendString
Remarks
Before
issuing any commands that use position values, you should set the desired time
format by using the set
The following
command returns the current mode of the mysound device:
status mysound mode
See Also