Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 149
define a tone for generation — dx_bldtngen( )
Generating a tone with a high frequency component (approximately 700 Hz or higher) will cause
the amplitude of the tone to increase. The increase will be approximately 1 dB at 1000 Hz. Also,
the amplitude of the tone will increase by 2 dB if an analog (loop start) device is used.
!
!!
! Cautions
None.
!
!!
! Errors
None.
!
!!
! Example
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
main()
{
TN_GEN tngen;
int dxxxdev;
/*
* Open the Voice Channel Device and Enable a Handler
*/
if ( ( dxxxdev = dx_open( "dxxxB1C1", 0 ) ) == -1 ) {
perror( "dxxxB1C1" );
exit( 1 );
}
/*
* Build a Tone Generation Template.
* This template has Frequency1 = 1140,
* Frequency2 = 1020, amplitute at -10dB for
* both frequencies and duration of 100 * 10 msecs.
*/
dx_bldtngen( &tngen, 1140, 1020, -10, -10, 100 );
/*
* Continue Processing
* .
* .
* .
*/
/*
* Close the opened Voice Channel Device
*/
if ( dx_close( dxxxdev ) != 0 ) {
perror( "close" );
}
/* Terminate the Program */
exit( 0 );
}
!
!!
! See Also
TN_GEN structure