# cnfStopTone

Stops the tone generation started by cnfStartTone.

#### Prototype

DWORD cnfStopTone ( CNFRESOURCEHD reshd, DWORD confid)

Argument | Description
reshd | Resource handle returned by cnfOpenResource.
confid | Conference identifier returned by cnfCreateConference.

#### Return values

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.

#### Events

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.

#### Details

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.

#### Example

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 */
}