Previous PageTable Of Contents../index.htmlIndexNext Page



5.11. DX_SVCB: Speed/Volume Adjustment Condition Block

The DX_SVCB data structure contains parameters for the Speed/Volum Adjustment Condition Block.

This strucutre is used by dx_setsvcond( ) function to specify a play adjustment condition that is added to the internal Speed and Volume Condition Table (SVCT). The play adjustment conditions in the SVCT are used to adjust speed or volume automatically at the beginning of playback or in response to digits entered by the user during playback.

The dx_setsvcond( ), dx_addspddig( ), and dx_addvoldig( ) functions can be used to add play adjustment conditions to the SVCT. These functions tie a speed or volume adjustment to an external event, such as a DTMF digit.

You cannot change an existing speed or volume adjustment condition in the SVCT without using the dx_clrsvcond( ) function to clear the SVCT of all conditions and then adding a new set of adjustment conditions to the SVCT.

This structure is used to specify the following:

NOTE:
To reset or remove any DX_SVCB adjustment condition blocks, you must clear all the speed/volume adjustment conditions using dx_clrsvcond( ).

The typedef for the structure is as follows:

Parameter

Description

type

Type of Playback Adjustment: Specifies an OR combination of the following:

  Adjustment Table Type (required): specifies one adjustment type, either speed or volume

  Adjustment Method (required): specifies one adjustment method (step, index, or toggle), which also determines how the adjsize value is used

  Options: specifies one or no options (level/edge digit detection, or automatic adjustment for beginning of next playback)

   
 

Table Type

Description

 

SV_SPEEDTBL

  selects speed table

 

SV_VOLUMETBL

  selects volume table

   
 

Adjustment Method

Description

 

SV_ABSPOS

  Index: Sets adjsize field to use an absolute adjustment position (index) in the Speed or Volume Modification Table. The index value can be from -10 to +10, based on position 0, the origin, or center, of the table.

 

SV_RELCURPOS

  Step: Sets adjsize field to use a number of steps by which to adjust the speed or volume. The number of steps is relative to the current position in the table. Specify the adjustment in a positive or negative number of steps to increase or decrease the current speed or volume. For example, specify -2 to lower the speed or volume by 2 steps in the Speed or Volume Modification Table.

 

SV_TOGGLE

  Toggle: Sets adjsize field to use one of the toggle defines, which control the values for the current and last-modified speed and volume settings and allow you to toggle the speed or volume between standard (the origin) and any setting selected by the user.

   
 

Options

Description

 

SV_LEVEL

  Level: Sets the digit adjustment condition to be level sensitive. At the start of play, existing digits in the digit buffer will be checked to see if they are level-sensitive play adjustment digits. If the first digit in the buffer is a level-sensitive play adjustment digit, it will cause a play adjustment and be removed from the buffer. Subsequent digits in the buffer will be treated the same way until the first occurrence of any digit that is not an SV_LEVEL play adjustment digit.

If SV_LEVEL is not specified, the digit adjustment condition is edge sensitive; Existing edge-sensitive play adjustment digits in the digit buffer will not cause a play adjustment; but after the playback starts, edge-sensitive digits will cause a play adjustment.

 

SV_BEGINPLAY

  Automatic: Sets the play adjustment to occur automatically at the beginning of the next playback. This sets a speed or volume level without using a digit condition. The digit and digtype fields are ignored.

   

adjsize

Adjustment Size: Specifies the adjustment size. The valid values follow according to the adjustment method:

  Step (SV_RELCURPOS)

  Index (SV_ABSPOS)

  Toggle Method (SV_TOGGLE)

   
 

Step Values

Description

 

+/- integer

  a positive or negative integer representing the number of steps to adjust the level relative to the current setting in the SVMT.

   
 

Index Values

Description

 

-10 to +10 (integer)

  an integer from -10 to +10 representing an absolute position in the SVMT.

   
 

Toggle Methods

Description

 

SV_TOGORIGIN

  Sets the digit to toggle between the origin and the last modified speed or volume level (for example, between the -5 and 0 levels).

 

SV_CURORIGIN

  Resets the current speed or volume level to the origin (same effect as SV_ABSPOS with adjsize 0).

 

SV_CURLASTMOD

  Sets the current speed or volume to the last modified speed volume level (swaps the current and last-modified settings).

 

SV_RESETORIG

  Resets the current speed or volume to the origin and the last modified speed or volume to the origin.

   

digit

Digit: Specifies an ASCII digit that will adjust the play: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, #, *

digtype

Digit Type: Specifies the type of digit:

 

DG_DTMF

  DTMF digits

The following DX_SVCB structure is set to decrease the volume by one step whenever the DTMF digit 1 is detected:

The following DX_SVCB structure will set the playback speed to the value in the Speed Modification Table position 5 whenever the DTMF digit 2 is detected:


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