Stops the tone generation started by cnfStartTone.
DWORD cnfStopTone ( CNFRESOURCEHD reshd, DWORD confid)
|
Argument |
Description |
|
reshd |
Resource handle returned by cnfOpenResource. |
|
confid |
Conference identifier returned by cnfCreateConference. |
|
Return value |
Description |
|
SUCCESS |
|
|
CTAERR_BOARD_ERROR |
Tone cannot be stopped because the board stopped responding. |
|
CTAERR_INVALID_HANDLE |
reshd is not a valid conference handle. |
|
CNFERR_CONFERENCE_EMPTY |
Conference confid currently has no members. |
|
CNFERR_INVALID_IDENTIFIER |
confid is not a valid conference identifier. |
|
CNFERR_INVALID_PARAMETER |
parms is inconsistent or out of range. |
|
Event |
Description |
|
CNFEVN_TONE_DONE |
Tone generation completed or was stopped. Generated only if event_mask is set to CNF_EVNMSK_TONE_DONE when cnfStartTone is called, and if cnfStartTone returns SUCCESS. |
cnfStopTone terminates the tone generation started by cnfStartTone. If no tone was being played, the function returns SUCCESS.
For more information, refer to Playing a tone.
extern CNFRESOURCEHD cnfresourcehd;
int stopConferenceTone( DWORD confid )
{
CTA_EVENT event;
if( cnfStopTone( cnfresourcehd, confid) != SUCCESS )
return MYFAILURE;
do
{
myGetEvent( &event ); /* based on ctaWaitEvent */
} while( event.id != CNFEVN_TONE_DONE );
if( CTA_IS_ERROR( event.value ) )
return MYFAILURE; /* API error */
else
return SUCCESS; /* started successfully */
}