Previous PageTable Of Contents../index.htmlIndexNext Page

cc_PlayTone( )

Description | Termination Events | Cautions | Example | Errors | See Also

Name:

int cc_PlayTone(devHdl, pToneParm, tptp, mode)

Inputs:

int devHdl

  channel device handle

 

toneParm *pToneParm

  pointer to the toneParm structure

 

DV_TPT *tptp

  pointer to the DV_TPT structure

 

int mode

  asynchronous/synchronous

Returns:

0 on success
<0 on failure

Includes:

cclib.h

Category:

Global Tone Generation

Mode:

asynchronous or synchronous

Technology:

BRI/SC

Top Of PageDescription

The cc_PlayTone( ) function allows the application to play a user-defined tone. The tone's attributes are defined in the structure toneParm, which is pointed to by the parameter pToneParm.

Parameter

Description

devHdl:

The channel device handle of the channel on which the tone is to be played.

pToneParm:

The pointer to the tone parameter structure. See Section 6.14. ToneParm for a description of the toneParm structure.

tptp:

Points to the DV_TPT data structure, which specifies the terminating condition (DX_MAXTIME) for the function. DX_MAXTIME is the only allowed terminating condition; no other termination conditions are supported. See the Voice Software Reference -- Features Guide for the appropriate operating system for a description of the DV_TPT data structure.

mode:

Specifies whether to run the function asynchronously (EV_ASYNC) or synchronously (EV_SYNC).

Top Of PageTermination Events

Use the SRL Event Management functions to handle the termination event.

Top Of PageCautions

Top Of PageExample

Top Of PageErrors

If the function returns < 0 to indicate failure, use the cc_CauseValue( ) function to retrieve the reason code for the failure. The cc_ResultMsg( ) function can be used to interpret the reason code. Error codes are defined in the files ccerr.h, isdnerr.h, and isdncmd.h.

Error codes from the cc_PlayTone( ) function include the following:

Error Code

Description

ERR_TONEINVALIDMSG

Invalid message type

ERR_TONEBUSY

Busy executing previous command

ERR_TONECP

System error with CP

ERR_TONEDSP

System error with DSP

ERR_TONEFREQ1

Invalid value specified in parameter freq 1

ERR_TONEFREQ2

Invalid value specified in parameter freq 2

ERR_TONEAMP1

Invalid value specified in parameter amp1

ERR_TONEAMP2

Invalid value specified in parameter amp2

ERR_TONEON1

Invalid value specified in parameter toneOn1

ERR_TONEOFF1

Invalid value specified in parameter toneOff1

ERR_TONEDURATION

Invalid value specified in parameter duration

ERR_TONECHANNELID

Invalid channel ID

Top Of PageSee Also


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2001, Dialogic Corporation
All rights reserved
This page generated December, 2001