set
The set
command establishes control settings for the device. CD audio, digital-video,
MIDI sequencer, VCR, videodisc, video-overlay, and waveform-audio devices
recognize this command.
wsprintf(lpstrCommand, "set %s %s %s",
lpszDeviceID, lpszSetting,
lpszFlags);
Parameters
lpszDeviceID
Identifier of
an MCI device. This identifier or alias is assigned when the device is opened.
lpszSetting
Flag for
establishing control settings. The following table lists device types that
recognize the set command and the flags used by each type:
cdaudio |
audio all
off |
door closed |
digitalvideo |
audio all
off |
file format
format |
overlay |
audio all
off |
audio right
on |
sequencer |
audio all
off |
port mapper |
vcr |
assemble
record on |
power on |
videodisc |
audio all
off |
door open |
waveaudio |
alignment integer |
channels channel_count |
The following
table lists the flags that can be specified in the lpszSetting parameter
and their meanings:
alignment integer |
Sets the
alignment of data blocks relative to the start of data passed to the
waveform-audio device. The file is saved in this format. |
any input |
Use any
input that supports the current format when recording. This is the default
setting. |
any output |
Use any
output that supports the current format when playing. This is the default. |
assemble
record on |
In assemble
mode, all tracks are recorded as defined by the device. Most VCRs are in
assemble mode by default. |
audio all
off |
Disables or
enables audio output. Video-overlay devices, the MCISEQ sequencer, and the
MCIWAVE waveform-audio device do not support this flag. |
audio left
off |
Disables or
enables output to either the left or the right audio channel. Video-overlay
devices, the MCISEQ sequencer, and the MCIWAVE waveform-audio device do not
support this flag. |
bitspersample
bit_count |
Sets the
number of bits per PCM (Pulse Code Modulation) sample played or recorded. The
file is saved in this format. |
bytespersec
byte_rate |
Sets the average
number of bytes per second played or recorded. The file is saved in this
format. |
channels channel_count |
Sets the
channels for playing and recording. The file is saved in this format. |
clock time |
Sets time
on the external clock to time. The format is specified as a long
unsigned integer. |
counter
format |
Set the
time format for the counter, as returned by status |
counter value |
Sets the
VCR counter to the specified value. The value must be specified in the
current counter format. For more information, see the set counter
format command. |
door closed |
Retracts
the tray and closes the door, if possible. For VCRs, loads the tape
automatically. |
door open |
Opens the door
and ejects the tray or tape, if possible. |
file format
format |
Specifies a
file format that is used for save3Z90_UG commands. If omitted, this might
default to a device driver defined format. If the specified file format
conflicts with the currently selected algorithm and quality, then they are
changed to the defaults for the file format. The following file formats are
defined: avi avss dib jfif jpeg mpeg rdib rjpeg |
format tag
pcm |
Sets the
format type to PCM for playing and recording. The file is saved in this
format. |
format tag tag |
Sets the
format type for playing and recording. The file is saved in this format. |
index
timecode |
Sets the
current display screen on the VCR. |
input integer |
Sets the
audio channel used as the input. |
length duration |
Sets the
user-specified length of the tape in the VCR. This length is returned by the status |
master midi |
Sets the
MIDI sequencer as the synchronization source. Synchronization data is sent in
MIDI format. The MCISEQ sequencer does not support this flag. |
master none |
Inhibits
the MIDI sequencer from sending synchronization data. The MCISEQ sequencer
does not support this flag. |
master smpte |
Sets the
MIDI sequencer as the synchronization source. Synchronization data is sent in
SMPTE (Society of Motion Picture and Television Engineers) format. The MCISEQ
sequencer does not support this flag. |
offset time |
Sets the
SMPTE offset time. The offset is the beginning time of a SMPTE based
sequence. The time is expressed as hh:mm:ss:ff,
where hh is hours, mm is minutes, ss is seconds, and ff
is frames. |
output integer |
Sets the
audio channel used as the output. |
pause timeout |
Sets the
maximum duration, in milliseconds, of a pause |
postroll
duration duration |
Sets the
length, in the current time format, needed to brake the VCR transport when a stop |
port mapper |
Sets the
MIDI mapper as the port receiving the MIDI messages. This command fails if
the MIDI mapper or a port it needs is being used by another application. |
port none |
Disables
the sending of MIDI messages. This command also closes a MIDI port. |
port port_number |
Sets the
MIDI port receiving the MIDI messages. This command fails if the port you are
trying to open is being used by another application. |
power on |
Sets the
device power to on or off. |
preroll
duration duration |
Sets the
length, in the current time format, needed to stabilize the VCR output. |
record
format SP |
Sets the
recording mode for the VCR to SP for standard play, EP for extended play, or
LP for long play. These values are not intended to be VHS specific. They map
to any three appropriate modes with other tape formats. For example, SP maps
to the fastest, highest quality recording. |
samplespersec
integer |
Sets the sample
rate for playing and recording. The file is saved in this format. |
seek
exactly on |
Selects one
of two seek modes. With seek exactly on , seek will always move to the frame
specified. With seek exactly off , seek will move to the closest key frame
prior to the frame specified. |
slave file |
Sets the
MIDI sequencer to use file data as the synchronization source. This is the
default setting. |
slave midi |
Sets the
MIDI sequencer to use incoming MIDI data for the synchronization source. The
sequencer recognizes synchronization data with the MIDI format. The MCISEQ
sequencer does not support this flag. |
slave none |
Sets the
MIDI sequencer to ignore synchronization data. |
slave smpte |
Sets the
MIDI sequencer to use incoming MIDI data for the synchronization source. The
sequencer recognizes synchronization data with the SMPTE format. The MCISEQ
sequencer does not support this flag. |
speed factor |
Sets the
relative speed of video and audio playback from the workspace. Factor
is the ratio between the nominal frame rate and the desired frame rate, where
the nominal frame rate is designated as 1000. (A rate of 500 is half normal
speed, 2000 is twice normal speed, and so on.) Setting the speed to zero
plays the video as fast as possible without dropping frames and without
audio. |
still file
format format |
Specifies
the file format used for capture |
tempo tempo_value |
Sets the
tempo of the sequence according to the current time format. For a PPQN-based
file, the tempo_value is interpreted as beats per minute. For a
SMPTE-based file, the tempo_value is interpreted as frames per second.
|
time format
bytes |
In a PCM
file format, sets the time format to bytes. All position information is
specified as bytes following this command. |
time format
frames |
Sets the
time format to frames. All commands that use position values will assume
frames. When the device is opened, frames is the default mode. Supported by
videodiscs using CAV format. |
time format
hms |
Sets the
time format to hours, minutes, and seconds. All commands that use position
values will assume HMS. HMS is the default format for CLV videodiscs. Specify an
HMS value as hh:mm:ss, where hh is hours, mm
is minutes, and ss is seconds. You can omit a field if it and all
following fields are zero. For example, |
time format
milliseconds |
Sets the
time format to milliseconds. All commands that use position values will
assume milliseconds. You can abbreviate milliseconds as ms . For
sequencer devices, the sequence file sets the default format to PPQN or
SMPTE. Video-overlay devices do not support this flag. |
time format
msf |
Sets the
time format to minutes, seconds, and frames. All commands that use position
values will assume MSF (the default format for CD audio). Specify an
MSF value as mm:ss:ff, where mm is minutes, ss
is seconds, and ff is frames. You can omit a field if it and all
following fields are zero. For example, 3, 3:0, and 3:0:0 are valid ways to
express 3 minutes. The MSF
fields have the following maximum values: Minutes 99 |
time format
samples |
Sets the
time format to samples. All position information is specified as samples
following this command. |
time format
smpte 24 |
Sets the
time format to an SMPTE frame rate. For VCRs,
sets the time format to hh:mm:ss:ff, where the legal values are 00:00:00:00
through 23:59:59:xx, and xx is one less than the frames per
second as specified by the number 24, 25, or 30 as specified in the flag. On
input, colons (:) are required to separate the components. The least
significant units can be All
commands that use position values will assume SMPTE format. The
sequence file sets the default format to PPQN or SMPTE. |
time format
smpte 30 drop |
Sets the
time format to SMPTE 30 drop frame rate. For VCRs,
same as SMPTE 30, except that certain timecode positions are dropped from the
format to have the recorded timecode positions for each frame (at the NTSC
frame rate of 29.97 fps) correspond to real time (at 30 fps). Timecode
positions that are dropped are as follows: two every minute, on the minute,
for the first nine of every ten minutes of recorded content. For example, at
01:04:59:29, the next timecode position would be 01:05:00:02, not 01:05:00:00.
All
commands that use position values will assume SMPTE format. The
sequence file sets the default format to PPQN or SMPTE. |
time format
song pointer |
Sets the
time format to song pointer (sixteenth notes). All commands that use position
values will assume song pointer units. This flag is valid only for a sequence
of division type PPQN. |
time format
tmsf |
Sets the
time format to tracks, minutes, seconds, and frames. All commands that use
position values will assume TMSF. Specify a
TMSF value as tt:mm:ss:ff, where tt is
tracks, mm is minutes, ss is seconds, and ff is frames.
You can omit a field if it and all following fields are zero. For example, 3,
3:0, 3:0:0, and 3:0:0:0 are all valid ways to express track 3. The TMSF
fields have the following maximum values: Tracks 99 |
time format
track |
Sets the
position format to tracks. All commands that use position values will assume
tracks. |
time mode
counter |
Sets the
position-information mode to use the VCR counters. |
time mode
detect |
Sets the
position information mode based on detection of timecode information
on the tape. If timecode information is detected, the time type is set
to timecode ; otherwise, the time type is set to counter . Detect is
a special mode. Whenever the driver is opened, a new tape is inserted, or the
time mode command is issued, the driver checks the current time mode
available on the tape and sets time type to either timecode or
counter . Once time type is set, the driver doesn t change it until one of
the above conditions occurs again. |
time mode
timecode |
Sets the
position information mode to use timecode information on the tape. |
tracking
plus |
Adjusts the
speed of the videotape transport in fine increments. Use the tracking flags
when a noisy picture is obtained from a VCR. Tracking plus increases the
transport speed. Tracking minus decreases the transport speed. Tracking
reset returns the tracking adjustment to zero. |
video off |
Disables
video output. |
video on |
Enables
video output. |
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 zero
if successful or an error otherwise.
Remarks
Several
properties of waveform-audio data are defined when the file to store the data
is created. These properties describe how the data is structured within the
file and cannot be changed once recording begins. The following list identifies
these properties:
alignment
bitspersample
bytespersec
channels
format tag
samplespersec
The following
command sets the time format to milliseconds and sets the waveform-audio format
to 8 bit, mono, 11 kHz:
set mysound time format ms bitspersample 8 channels
1 samplespersec 11025
See Also