Table of Contents Index NMS Glossary Previous Page Next Page (Page 22 of 23 in this chapter) Version


cnfStartTone

Description

Starts playing a tone to every member of the conference.

Prototype

DWORD cnfStartTone ( CNFREOURCEHD reshd
DWORD confid,
CNF_TONE_PARMS *parms )

reshd Resource handle returned by cnfOpenResource.

confid Conference identifier returned by cnfCreateConference.

parms Pointer to a CNF_TONE_PARMS structure:

typedef struct
{
DWORD size ; /* size of this structure */ DWORD freq1; /* first frequency (Hz) */ INT32 ampl1; /* level of first tone (dBm) */ DWORD freq2; /* second frequency (Hz) */ INT32 ampl2; /* level of second tone (dBm) */ DWORD ontime; /* on duration of DTMF tone (ms) */ DWORD offtime; /* off duration of DTMF tone (ms) */ INT32 iterations; /* times to repeat above; */
/* -1 = forever last offtime is */
/* trimmed if repeat>1 */ } CNF_TONE_PARMS;
See the Details section for a description of these fields.

Return Values

Events

Details

This function plays a tone to all members currently attending the conference designated by confid. When this function is invoked, members stops hearing each other and hear only the tone.

The CNF_TONE_PARMS structure contains the following fields:
Field

Description

freq1

The first of two frequencies or the only frequency of the tone to be generated (in Hz).

ampl1

The amplitude (in dBm) of the first frequency.

freq2

The second frequency (in Hz) if the tone to be generated contains two frequencies, or zero otherwise.

ampl2

The amplitude (in dBm) of the second frequency.

ontime

The duration (in ms) of the tone.

offtime

The duration (in ms) of silence to follow the tone; specify 0 for no offtime.

iterations

The number of times to repeat the tone (and silence period); specify -1 to repeat a cadence tone forever.

If the iterations count is one (1), the tone is not complete until the offtime has expired. If the iterations count is more than one, then the final offtime is omitted.

To generate a tone continuously (i.e. forever), set iterations to -1 and specify an offtime of 0 (zero). Use the cnfStopTone command to terminate tone generation prematurely.

For more information, refer to Section 4.9, Playing a Tone.

See Also

cnfStopTone

Example

extern CNFRESOURCEHD cnfresourcehd;

int myConferenceTone( DWORD confid )
{
 CTA_EVENT event;
 CNF_TONE_PARMS toneparms;

 // Fill the tone structure
 toneparms.size = sizeof(CNF_TONE_PARMS);
 toneparms.freq1 = 1000;
 toneparms.ampl1 = -20;
 toneparms.freq2 = 500;
 toneparms.ampl2 = -20;
 toneparms.ontime = 200;
 toneparms.offtime = 200;
 toneparms.iterations = 2;

 cnfStartTone ( cnfresourcehd, confid, &toneparms);

    do 
    {
        myGetEvent( &event );        /* see ctaWaitEvent example */
    } while( event.id != CNFEVN_TONE_DONE );

    if( CTA_IS_ERROR( event.value ) )
        return MYFAILURE;            /* API error                */
    else
        return SUCCESS;              /* started successfully     */
}


Table of Contents Index NMS Glossary Previous Page Next Page (Page 22 of 23 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.