Intel 05-1832-002 IP Phone User Manual


 
316 Voice API for Windows Operating Systems Library Reference — November 2003
dx_playtone( ) — play tone defined by TN_GEN structure
Set termination conditions using a DV_TPT structure, which is pointed to by the tptp parameter.
After dx_playtone( ) terminates, use the ATDX_TERMMSK( ) function to determine the reason
for termination.
!
!!
! Synchronous Operation
By default, this function runs synchronously, and returns a 0 to indicate that it has completed
successfully.
Set termination conditions using a DV_TPT structure, which is pointed to by the tptp parameter.
After dx_playtone( ) terminates, use the ATDX_TERMMSK( ) function to determine the reason
for termination.
!
!!
! Cautions
The channel must be idle when calling this function.
If the tone generation template contains an invalid tg_dflag, or the specified amplitude or
frequency is outside the valid range, dx_playtone( ) will generate a TDX_ERROR event if
asynchronous, or -1 if synchronous.
On DM3 boards, the DX_MAXTIME termination condition is not supported by tone
generation functions, which include dx_playtone( ).
!
!!
! Errors
If the function returns -1, use the Standard Runtime Library (SRL) Standard Attribute function
ATDV_LASTERR( ) to obtain the error code or use ATDV_ERRMSGP( ) to obtain a descriptive
error message. One of the following error codes may be returned:
EDX_AMPLGEN
Invalid amplitude value in TN_GEN structure
EDX_BADPARM
Invalid parameter
EDX_BADPROD
Function not supported on this board
EDX_BADTPT
Invalid DV_TPT entry
EDX_BUSY
Busy executing I/O function
EDX_FLAGGEN
Invalid tn_dflag field in TN_GEN structure
EDX_FREQGEN
Invalid frequency component in TN_GEN structure
EDX_SYSTEM
Error from operating system; use dx_fileerrno( ) to obtain error value