Previous PageTable Of Contents../index.htmlIndexNext Page

dx_adjsv( )

Description | Cautions | Example | Errors | See Also

Name:

int dx_adjsv(chdev,tabletype,action,adjsize)

Inputs:

int chdev

  valid channel device handle

 

unsigned short tabletype

  table to set (speed or volume)

 

unsigned short action

  how to adjust (absolute position, relative change or toggle)

 

unsigned short adjsize

  adjustment size

Returns:

0 if successful

 

-1 if failure

Includes:

srllib.h
dxxxlib.h

Category:

Speed and Volume

Top Of PageDescription

The dx_adjsv( ) function adjusts speed or volume immediately, and for all subsequent plays on a specified channel (until changed or cancelled). Speed or volume can be set to a specific value, adjusted incrementally, or can be set to toggle. See the action parameter description for information.

dx_adjsv( ) utilizes the Speed and Volume Modification Tables to make adjustments to play-speed or play-volume. These tables have 21 entries that represent different levels of speed or volume. There are up to ten levels above and below the regular speed or volume. These tables can be set with explicit values using dx_setsvmt( ) or default values can be used. Refer to the Voice Software Reference: Voice Features Guide for detailed information about these tables.

NOTES:
1. This function is similar to dx_setsvcond( ). 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_setsvcond( ) for more information.
2. Whenever a play is started its speed and volume is based on the most recent modification.

Parameter

Description

chdev

specifies the valid channel device handle obtained when the channel was opened using dx_open( ).

tabletype

specifies whether to modify the play-back using a value from the Speed or the Volume Modification Table.

 

SV_SPEEDTBL

Use the Speed Modification Table

 

SV_VOLUMETBL

Use the Volume Modification Table

action

specifies the type of adjustment to make. Set to one of the following:

 

SV_ABSPOS

Set speed or volume to a specified position in the appropriate table. (The position is set using the adjsize parameter).

 

SV_RELCURPOS

Adjust speed or volume by the number of steps specified using the adjsize parameter.

 

SV_TOGGLE

Toggle between values specified using the adjsize parameter.

adjsize

specifies the size of the adjustment. adjsize has a different value depending on how the adjustment type is set using the action parameter. Set adjsize to one of the following:

For this
action value

Choose this
adjsize value

SV_ABSPOS

Specify the position between -10 to +10 in the Speed/Volume Modification Table that contains the required speed or volume adjustment. The origin (regular speed or volume) has a value of 0 in the table.

SV_RELCURPOS

Specify how many positive or negative steps in the Speed/Volume Modification Table by which to adjust the speed or volume. For example, specify -2 to lower the speed or volume by 2 steps in the Speed/Volume Modification Table.

SV_TOGGLE

Set the values between which speed or volume will toggle.

 

SV_TOGORIGIN - sets the speed/volume to toggle between the origin and the last modified level of speed/volume.

 

SV_CURORIGIN - resets the current speed/volume level to the origin (i.e. regular speed/volume).

 

SV_CURLASTMOD - sets the current speed/volume to the last modified speed volume level.

 

SV_RESETORIG - resets the current speed/volume to the origin and the last modified speed/volume to the origin

Top Of PageCautions

None.

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

Top Of PageSee Also

Related to Speed and Volume:

Setting Speed and Volume conditions:


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