Dialogic 05-0867-005 Table Top Game User Manual


 
cc_StopTone( ) forces the termination of a tone
272
Use the SRL Event Management functions to handle the termination event.
!
! !
!
Cautions
If an I/O function terminates due to another reason before the cc_StopTone( )
function is issued, the reason for termination will not indicate that
cc_StopTone( ) was called.
In asynchronous mode, if the application tries to stop a tone that is already
stopped, the CCEV_STOPTONEFAIL termination event will be received.
Using the cc_ResultMsg( ) function will retrieve the error code
ERR_TONESTOP.
In synchronous mode, if the application tries to stop a tone that is already
stopped, the function will fail. Using the cc_ResultMsg( ) function will
retrieve the error code ERR_TONESTOP.
When calling cc_StopTone( ) from a signal handler, the mode parameter
must be set to EV_ASYNC.
This function is not supported for the BRI/2 board or PRI protocols.
!
! !
!
Example
#include <windows.h> /* For Windows applications only */
#include <srllib.h>
#include <dxxxlib.h>
#include <cclib.h>
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;