Previous PageTable Of Contents../index.htmlIndexNext Page

dx_setsvcond( )

Description | Cautions | Example | Errors | See Also

Name:

int dx_setsvcond( chdev, numblk, svcbp)

Inputs:

int chdev

  valid channel device handle

 

unsigned short numblk

  number of DX_SVCB blocks

 

DX_SVCB * svcbp

  pointer to array of DX_SVCB structures

Returns:

0 if success

 

-1 if failure

Includes:

srllib.h

 

dxxxlib.h

Category:

Speed and Volume

Top Of PageDescription

The dx_setsvcond( ) function sets adjustments and adjustment conditions for all subsequent plays on the specified channel (until changed or cancelled). An "adjustment" is a modification to play-speed or play-volume that takes place due to an "adjustment condition" such as start of play, or the occurrence of an incoming digit during play. This function uses the specified channel's speed or volume Speed/Volume Modification Table. Detailed information about these tables are contained in the Voice Software Reference: Voice Features Guide.

NOTE:
Calls to dx_setsvcond( ) are cumulative. If adjustment blocks have been set previously, calling this function adds more adjustment blocks to the list. To replace existing adjustment blocks, clear the current set of blocks using dx_clrsvcond( ) before issuing a dx_setsvcond( ).

The following adjustments and adjustment conditions are defined in the Speed/Volume Adjustment Condition Blocks DX_SVCB):

See the chapter on Data Structures for a full description of the DX_SVCB structure. Up to 20 DX_SVCB blocks can be specified in the form of an array.

NOTES:
1. This function is similar to dx_adjsv( ). Use dx_adjsv( ) to explicitly adjust the play immediately and use dx_setsvcond( ) to adjust the play in response to specified conditions. See the description of dx_adjsv( ) for more information.
2. Whenever the play is started its speed and volume is based on the most recent modification.

Parameter

Description

chdev

specifies the valid channel device handle obtained by a call to dx_open( ).

numblk

specifies the number of DX_SVCB blocks in the array. Set to a value between 1 and 20.

svcbp

points to an array of DX_SVCB structures.

Top Of PageCautions

  1. Condition blocks can only be added to the array (up to a maximum of 20). To reset or remove any condition, you should clear the whole array, and reset all conditions if required. (e.g., If DTMF digit 1 has already been set to increase play-speed by one step, a second call that attempts to redefine digit 1 to the origin, will have no affect. The digit will retain its original setting).
  2. The digit that causes the play adjustment will not be passed to the digit buffer, so it cannot be retrieved using dx_getdig( ) or ATDX_BUFDIGS( ).
  3. Digits that are used for play adjustment will not be used as a terminating condition. If a digit is defined as both, then the play adjustment will take priority.

Top Of PageExample

Top Of PageErrors

If this function returns -1 to indicate failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following error reasons:

EDX_BADPARM

  • Invalid Parameter

EDX_BADPROD

  • Function not supported on this board

EDX_SVADJBLKS

  • Invalid Number of Speed/Volume Adjustment blocks

EDX_SYSTEM

Top Of PageSee Also

Setting Speed and Volume conditions:

Related to Speed and Volume:


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2002, Dialogic Corporation
All rights reserved
This page generated February, 2002