Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 301
play recorded voice data — dx_play( )
Notes: 1. The rate specified in the last play function applies to the next play function, unless the rate was
changed in the parameter DXCH_PLAYDRATE using dx_setparm( ).
2. Specifying PM_SR6 or PM_SR8 changes the setting of the parameter DXCH_PLAYDRATE.
DXCH_PLAYDRATE can also be set and queried using dx_setparm( ) and dx_getparm( ). The
default setting for DXCH_PLAYDRATE is 6 kHz.
3. Make sure data is played using the same encoding algorithm and sampling rate used when the
data was recorded.
4. dx_play( ) will run synchronously if you do not specify EV_ASYNC, or if you specify
EV_SYNC (default).
5. Intel® telecom boards enable you to select either A-law or mu-law encoding of data. The default
on the board is set to mu-law and returns to mu-law after each play. The A-law parameters must
be passed each time the play function is called.
Table 10 shows play mode selections when transmitting or not transmitting a tone before initiating
play. The first column of the table lists the two play features (tone or no tone), and the first row lists
each type of encoding algorithm (ADPCM or PCM) and data storage rate for each
algorithm/sampling rate combination in parenthesis (24 kbps, 32 kbps, 48 kbps, or 64 kbps).
Select the desired play feature in the first column of the table and look across that row until the
column containing the desired encoding algorithm and data-storage rate is reached. The play
modes that must be entered in the mode bit mask are provided where the feature 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 field to EV_ASYNC. When running
asynchronously, this function returns 0 to indicate it has initiated successfully, and generates a
TDX_PLAY termination event to indicate completion.
Termination conditions for play are set using the DV_TPT structure. Play continues until all data
specified in DX_IOTT has been played, or until one of the conditions specified in DV_TPT is
satisfied.
Termination of asynchronous play is indicated by a TDX_PLAY event. Use the Standard Runtime
Library (SRL) Event Management functions to handle the termination event.
Table 10. Play Mode Selections
Feature(s) ADPCM (24 kbps) ADPCM (32 kbps) PCM (48 kbps) PCM (64 kbps)
Tone PM_TONE
PM_SR6
{MD_ADPCM}
PM_TONE
PM_SR8
{MD_ADPCM}
PM_TONE
PM_ALAW*
PM_SR6
MD_PCM
PM_TONE
PM_ALAW*
PM_SR8
MD_PCM
No Tone PM_SR6
{MD_ADPCM}
PM_SR8
{MD_ADPCM}
PM_SR6
MD_PCM
PM_SR8
MD_PCM
{ } = Default modes.
* = Select if file was encoded using A-law