forces the termination of a tone cc_StopTone( )
271
Name: int cc_StopTone(devHdl, mode)
Inputs: int devHdl channel device handle
int mode asynchronous/synchronous
Returns: 0 on success
<0 on failure
Includes: cclib.h
Category: Global Tone Generation
Mode: asynchronous/synchronous
Technology: BRI/SC
!
! !
!
Description
The cc_StopTone( ) function forces the termination of a tone that is currently
playing on a channel. The function forces a channel that is in the playing state to
become idle. Running the cc_StopTone( ) function asynchronously initiates the
function without affecting processes on other channels. Running this function
synchronously within a process does not block other processing, allowing other
processes to continue to be serviced.
The cc_StopTone( ) function allows the application to stop the playing of user-
defined tones only. This command cannot be used to stop the playing of the
firmware-applied call progress tones. The firmware-applied call progress tones
and user-defined tones operate independently, except that when the firmware is
playing a call progress tone, the application may not play a user-defined tone on
the same channel at the same time.
Parameter Description
devHdl: Specifies the channel device handle that was obtained when
the channel was opened using cc_Open( ).
mode: Specifies whether to run the function asynchronously
(EV_ASYNC) or synchronously (EV_SYNC).
!
! !
!
Termination Events
CCEV_STOPTONE - indicates that the tone was successfully stopped and
the channel was returned to the idle state.
CCEV_STOPTONEFAIL - indicates that the request to stop a tone and return
the channel to the idle state failed.