Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 337
record voice data from a single channel — dx_rec( )
Notes: 1. If both MD_ADPCM and MD_PCM are set, MD_PCM will take precedence. If both MD_GAIN
and MD_NOGAIN are set, MD_NOGAIN will take precedence. If both RM_TONE and NULL
are set, RM_TONE takes precedence. If both RM_SR6 and RM_SR8 are set, RM_SR6 will take
precedence.
2. Specifying RM_SR6 or RM_SR8 in mode changes the setting of the parameter
DXCH_RECRDRATE. DXCH_RECRDRATE can also be set and queried using dx_setparm( )
and dx_getparm( ). The default setting for DXCH_RECRDRATE is 6 kHz.
3. If A-law data encoding is selected (RM_ALAW), the A-law parameters must be passed each
time the record function is called or the setting will return to mu-law (the default).
4. The rate specified in the last record function will apply to the next record function, unless the rate
was changed in the parameter DXCH_RECRDRATE using dx_setparm( ).
5. When using the RM_TONE bit for tone-initiated record, each time slot must be “listening” to the
transmit time slot of the recording channel because the alert tone can only be transmitted on the
recording channel transmit time slot.
tptp points to the Termination Parameter Table Structure, DV_TPT, which specifies
termination conditions for recording. For more information on this structure,
see DV_TPT, on page 485.
Note: In addition to DV_TPT terminations, the function can fail due to
maximum byte count, dx_stopch( ), or end of file. See
ATDX_TERMMSK( ) for a full list of termination reasons.
mode defines the recording mode. One or more of the values listed below may be
selected in the bit mask using bitwise OR (see Table 11 for record mode
combinations).
Choose one only:
EV_ASYNC – run asynchronously
EV_SYNC – run synchronously (default)
Choose one or more:
MD_ADPCM – record using Adaptive Differential Pulse Code Modulation
encoding algorithm (4 bits per sample). Recording with ADPCM is the
default setting.
MD_GAIN – record with Automatic Gain Control (AGC). Recording with
AGC is the default setting.
MD_NOGAIN – record without AGC
MD_PCM – record using Pulse Code Modulation encoding algorithm (8
bits per sample)
RM_ALAW – record using A-law
RM_TONE – transmit a tone before initiating record. If this mode is not
selected, no tone will be transmitted (the default setting).
RM_SR6 – record using 6 kHz sampling rate (6000 samples per second).
This is the default setting.
RM_SR8 – record using 8 kHz sampling rate (8000 samples per second)
RM_NOTIFY – generate record notification beep tone
Parameter Description