Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 315
play tone defined by TN_GEN structure — dx_playtone( )
dx_playtone( )
play tone defined by TN_GEN structure
!
!!
! Description
The dx_playtone( ) function plays tones defined by the TN_GEN structure, which defines the
frequency, amplitude, and duration of a single- or dual-frequency tone to be played.
!
!!
! Asynchronous Operation
To run this function asynchronously, set the mode parameter to EV_ASYNC. This function returns
0 to indicate it has initiated successfully, and generates a TDX_PLAYTONE termination event to
indicate completion. Use the Standard Runtime Library (SRL) Event Management functions to
handle the termination event; see the Standard Runtime Library API Library Reference for more
information.
Name: int dx_playtone(chdev, tngenp, tptp, mode)
Inputs: int chdev
valid channel device handle
TN_GEN *tngenp
pointer to the 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
Parameter Description
chdev specifies the valid channel device handle obtained when the channel was
opened using dx_open( )
tngenp points to the TN_GEN structure, which defines the frequency, amplitude, and
duration of a single- or dual-frequency tone. For more information, see
TN_GEN, on page 530. You can use the dx_bldtngen( ) function to set up the
structure.
tptp points to the DV_TPT data structure, which specifies a terminating condition
for this function. For more information, see DV_TPT, on page 485.
mode specifies whether to run this function asynchronously or synchronously. Set to
one of the following:
EV_ASYNC – run dx_playtone( ) asynchronously
EV_SYNC – run dx_playtone( ) synchronously (default)