Intel 05-1832-002 IP Phone User Manual


 
146 Voice API for Windows Operating Systems Library Reference — November 2003
dx_bldstcad( ) — define a user-defined single-frequency cadenced tone
!
!!
! Cautions
Only one tone per application may be defined at any time. dx_bldstcad( ) will replace the
previous user-defined tone definition.
Do not use tone IDs 261, 262 and 263; they are reserved for library use.
If you are using R2/MF tone detection, reserve the use of tone IDs 101 to 115 for the R2/MF
tones. See the r2_creatfsig( ) function 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_4 104
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 Single Tone Frequency Tone of 950-1050 Hz.
* On between 190-210 msecs and off 990-1010 msecs and
* a cadence of 3.
*/
if (
dx_bldstcad( TID_4, 1000, 50, 20, 1, 100, 1, 3 )
== -1 ) {
printf( "Unable to build a Single Tone Cadence" );
printf( " Template\n");
}
/*
* Continue Processing
* .
* .
* .
*/
offtdev specifies the allowable deviation for off time (in 10 msec units)
repcnt specifies the number of repetitions for the cadence (i.e., the number of times
that an on/off signal is repeated)
Parameter Description