Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 319
play the cadenced tone defined by TN_GENCAD — dx_playtoneEx( )
dx_playtoneEx( )
play the cadenced tone defined by TN_GENCAD
!
!!
! Description
The dx_playtoneEx( ) function plays the cadenced tone defined by TN_GENCAD, which
describes a signal by specifying the repeating elements of the signal (the cycle) and the number of
desired repetitions. The cycle can contain up to four segments, each with its own tone definition
and on/off duration, which creates the signal pattern or cadence. Each segment consists of a
TN_GEN single- or dual-tone definition (frequency, amplitude and duration) followed by a
corresponding off-time (silence duration) that is optional. The dx_bldtngen( ) function can be used
to set up the TN_GEN components of the TN_GENCAD structure. The segments are seamlessly
concatenated in ascending order to generate the signal cycle.
This function returns the same errors, return codes, and termination events as the dx_playtone( )
function. Also, the TN_GEN array in the TN_GENCAD data structure has the same requirements
as the TN_GEN used by the dx_playtone( ) function.
Set termination conditions using the DV_TPT structure. This structure is pointed to by the tptp
parameter. After dx_playtoneEx( ) terminates, use the ATDX_TERMMSK( ) function to
determine the termination reason.
For signals that specify an infinite repetition of the signal cycle (cycles = 255) or an infinite
duration of a tone (tg_dur = -1), you must specify the appropriate termination conditions in the
DV_TPT structure used by dx_playtoneEx( ). Be aware that on DM3 boards, valid values are for
the cycles field of TN_GENCAD is 1 to 40 cycles. On Springware boards, valid values are from 1
to 255 (255 = infinite repetitions).
Name: int dx_playtoneEx(chdev, tngencadp, tptp, mode)
Inputs: int chdev
valid channel device handle
TN_GENCAD *tngencadp
pointer to the Cadenced Tone Generation template structure
DV_TPT *tptp
pointer to a Termination Parameter Table structure
int mode
asynchronous/synchronous
Returns: 0 if success
-1 if failure
Includes: srllib.h
dxxxlib.h
Category: Global Tone Generation
Mode: asynchronous or synchronous
Platform: DM3, Springware