Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 383
set up the tone detection amplitudes — dx_setgtdamp( )
When using this function in a multi-threaded application, use critical sections or a semaphore
around the function call to ensure a thread-safe application. Failure to do so will result in “Bad
Tone Template ID” errors.
!
!!
! Errors
If this function returns -1 to indicate failure, call 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. For a list of error codes returned by ATDV_LASTERR( ), see
the Error Codes chapter.
!
!!
! Example
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
#define TID 1; /* Tone ID */
.
.
.
/*
* Set amplitude for GTD;
* freq1 -30dBm to 0 dBm
* freq2 -30dBm to 0 dBm
*/
dx_setgtdamp(-30,0,-30,0)
;
/*
* Build temporary simple dual tone frequency tone of
* 950-1050 Hz and 475-525 Hz. using trailing edge detection, and
* -30dBm to 0dBm.
if (dx_blddt(TID1, 1000, 50, 500, 25, TN LEADING) ==-1) {
/* Perform system error processing */
exit(3);
}
.
.
.
!
!!
! See Also
None.