Dialogic 05-0867-005 Table Top Game User Manual


 
cc_PlayTone( ) play a user-defined tone
180
Use the SRL Event Management functions to handle the termination event.
!
! !
!
Cautions
The channel must be in the Idle state when calling the cc_PlayTone( )
function.
The cc_PlayTone( ) command is a host tone command that allows the
application to play a user-defined tone. This command cannot be used to set
or play the firmware-applied call progress tones. The call progress tones and
user-defined tones operate independently, except that when the firmware is
playing a tone, the application may not play a tone on the same channel at the
same time. For information on changing the firmware-applied call progress
tones, see the cc_ToneRedefine( ) function description.
This function is not supported for the BRI/2 board or for PRI protocols.
!
! !
!
Example
#include <windows.h> /* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include <srllib.h>
#include <cclib.h>
#include <dxxxlib.h>
#define TID_1 101
main()
{
toneParm ToneParm;
DV_TPT tpt;
int devHdl;
/*
* Open the Voice Channel Device and Enable a Handler
*/
if ( ( cc_Open(&devHdl, "briS1T1", 0))<0){
printf( "Error opening device : errno < %d\n, errno );
exit( 1 );
}
ToneParm.freq1 = 330;
ToneParm.freq2 = 460;
ToneParm.amp1 = -10;
ToneParm.amp2 = -10;
ToneParm.toneOn1 = 400;
ToneParm.toneOff1 = 0;
ToneParm.duration = -1;
tpt.tp_type = IO_EOT;
tpt.tp_termno = DX_MAXTIME;
tpt.tp_length = 6000;
tpt.tp_flags = TF_MAXTIME;
/*