Previous PageTable Of Contents../index.htmlIndexNext Page

dx_addspddig( )

Description | Cautions | Example | Errors | See Also

Name:

int dx_addspddig( chdev, digit, adjval)

Inputs:

int chdev

  valid Dialogic channel device handle

 

char digit

  DTMF digit

 

short adjval

  speed adjustment value

Returns:

0 if success
-1 if failure

Includes:

srllib.h
dxxxlib.h

Category:

Speed and Volume Convenience

Top Of PageDescription

The dx_addspddig( ) function is a convenience function that sets a DTMF digit to adjust speed by a specified amount, immediately and for all subsequent plays on the specified channel (until changed or cancelled).

NOTES:
1. Calls to this function are cumulative. To reset a digit condition, you need to clear all adjustment conditions using a dx_clrsvcond( ), and then reset the new condition.
2. Speed control is supported on D/21D, D/21E, D/41D, D/41ESC, D/41E, D/81A, D/121B, D/160SC-LS, D/240SC, D/240SC-T1, D/300SC-E1 and D/320SC boards.

This function assumes that the Speed Modification Table has not been modified using the dx_setsvmt( ) function.

Parameter

Description

chdev

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

digit

specifies a DTMF digit (0-9, *,#) that will modify speed by the amount specified in adjval.

 

To start play-speed at the origin, set digit to NULL and set adjval to SV_NORMAL.

adjval

specifies one of the following the speed adjustment values to take effect whenever the digit specified in digit occurs:

 

SV_ADD10PCT

Increase play - speed by 10%

 

SV_ADD20PCT

Increase play - speed by 20%

 

SV_ADD30PCT

Increase play - speed by 30%

 

SV_ADD40PCT

Increase play - speed by 40%

 

SV_ADD50PCT

Increase play - speed by 50%

 

SV_SUB10PCT

Decrease play - speed by 10%

 

SV_SUB20PCT

Decrease play - speed by 20%

 

SV_SUB30PCT

Decrease play - speed by 30%

 

SV_SUB40PCT

Decrease play - speed by 40%

 

SV_NORMAL

Set play - speed to origin (regular speed) when the play begins. digit must be set to NULL.

Top Of PageCautions

    1. This function is cumulative. To reset or remove any condition, you should clear all conditions, and reset 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 effect on speed or volume but it will be added to the array of conditions. 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.
    4. Speed control is supported on all the D/21D, D/21E, D/41D, D/41E, D/41ESC, D/81A, D/121B, D/160SC-LS, D/240SC, D/240SC-T1, D/300SC-E1, and D/320SC boards.

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_SYSTEM

EDX_SVADJBLK

  • Invalid Number of Play Adjustment Blocks

Top Of PageSee Also


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