Intel 05-1832-002 IP Phone User Manual


 
338 Voice API for Windows Operating Systems Library Reference — November 2003
dx_rec( ) — record voice data from a single channel
Table 11 shows recording mode selections. The first column of the table lists all possible
combinations of record features, and the first row lists each type of encoding algorithm (ADPCM
or PCM) and the data-storage rate for each algorithm/sampling rate combination in parenthesis
(24 kbps, 32 kbps, 48 kbps, or 64 kbps).
Select the desired record feature in the first column of the table and move across that row until the
column containing the desired encoding algorithm and data storage rate is reached. The record
modes that must be entered in dx_rec( ) are provided where the features row, and encoding
algorithm/data storage rate column intersect. Parameters listed in braces, { }, are default settings
and do not have to be specified.
!
!!
! Asynchronous Operation
To run this function asynchronously, set the mode parameter to EV_ASYNC. When running
asynchronously, this function returns 0 to indicate it has initiated successfully, and generates a
TDX_RECORD termination event to indicate completion.
Set termination conditions using the DV_TPT structure, which is pointed to by the tptp parameter.
Termination of asynchronous recording is indicated by a TDX_RECORD event. Use the Standard
Runtime Library (SRL) event management functions to handle the termination event.
After dx_rec( ) terminates, use the ATDX_TERMMSK( ) function to determine the reason for
termination.
Note: The DX_IOTT data area must remain in scope for the duration of the function if running
asynchronously.
Table 11. Record Mode Selections
Feature ADPCM (24 kbps) ADPCM (32 kbps) PCM (48 kbps) PCM (64 kbps)
AGC
No Tone
RM_SR6
{MD_ADPCM}
{MD_GAIN}
RM_SR8
{MD_ADPCM}
{MD_GAIN}
RM_SR6
RM_ALAW*
MD_PCM
{MD_GAIN}
RM_SR8
RM_ALAW*
MD_PCM
{MD_GAIN}
No AGC
No Tone
MD_NOGAIN
RM_SR6
{MD_ADPCM}
MD_NOGAIN
RM_SR8
{MD_ADPCM}
MD_NOGAIN
RM_SR6
MD_PCM
MD_NOGAIN
RM_SR8
MD_PCM
AGC
Tone
RM_TONE
RM_SR6
{MD_ADPCM}
{MD_GAIN}
RM_TONE
RM_SR8
{MD_ADPCM}
{MD_GAIN}
RM_TONE
RM_ALAW*
RM_SR6
MD_PCM
{MD_GAIN}
RM_TONE
RM_ALAW
*
RM_SR8
MD_PCM
{MD_GAIN}
No AGC
Tone
MD_NOGAIN
RM_TONE
RM_SR6
{MD_ADPCM}
MD_NOGAIN
RM_TONE
RM_SR8
{MD_ADPCM}
MD_NOGAIN
MD_PCM
RM_SR6
RM_TONE
RM_ALAW*
MD_NOGAIN
MD_PCM
RM_SR8
RM_TONE
RM_ALAW
*
{ } = Default modes.
* = Select if A-law encoding is required