Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 143
define a user-defined single-frequency tone — dx_bldst( )
If you are using R2/MF tone detection, reserve the use of tone IDs 101 to 115 for the R2/MF
tones. See r2_creatfsig( ) for further information.
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
None.
!
!!
! Example
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
#define TID_3 103
main()
{
int dxxxdev;
/*
* Open the Voice Channel Device and Enable a Handler
*/
if ( ( dxxxdev = dx_open( "dxxxB1C1", 0 ) ) == -1 ) {
perror( "dxxxB1C1" );
exit( 1 );
}
/*
* Describe a Simple Single Tone Frequency Tone of
* 950-1050 Hz using trailing edge detection.
*/
if (
dx_bldst( TID_3, 1000, 50, TN_TRAILING )
== -1 ) {
printf( "Unable to build a Single Tone Template\n" );
}
/*
* Continue Processing
* .
* .
* .
*/
/*
* Close the opened Voice Channel Device
*/
if ( dx_close( dxxxdev ) != 0 ) {
perror( "close" );
}
/* Terminate the Program */
exit( 0 );
}
!
!!
! See Also
global tone detection topic in Voice API Programming Guide
dx_blddtcad( )