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:
5.11.2. DX_SVCB DefinitionThe typedef for the structure is as follows:
typedef struct DX_SVCB {
unsigned short type; /* Bit Mask */
short adjsize; /* Adjustment Size */
unsigned char digit; /* ASCII digit value that causes the action */
unsigned char digtype; /* Digit Type (e.g., 0 = DTMF) */
} DX_SVCB;
5.11.3. DX_SVCB Parameters
Parameter |
Description | |
Type of Playback Adjustment: Specifies an OR combination of the following:
| ||
Description | ||
SV_SPEEDTBL |
| |
SV_VOLUMETBL |
| |
Description | ||
| ||
| ||
| ||
Options |
Description | |
| ||
| ||
Adjustment Size: Specifies the adjustment size. The valid values follow according to the adjustment method:
| ||
Step Values |
Description | |
+/- integer |
| |
Index Values |
Description | |
-10 to +10 (integer) |
| |
Toggle Methods |
Description | |
| ||
| ||
| ||
| ||
Digit: Specifies an ASCII digit that will adjust the play: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, #, * | ||
Digit Type: Specifies the type of digit: | ||
DG_DTMF |
| |
5.11.4. Example of Setting a DTMF Digit To Adjust Playback VolumeThe following DX_SVCB structure is set to decrease the volume by one step whenever the DTMF digit 1 is detected:
svcb[0].type = SV_VOLUMETBL | SV_RELCURPOS;
svcb[0].adjsize = - 1;
svcb[0].digit = '1';
svcb[0].digtype = DG_DTMF;
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:
svcb[0].type = SV_SPEEDTBL | SV_ABSPOS;
svcb[0].adjsize = 5;
svcb[0].digit = '2';
svcb[0].digtype = DG_DTMF;
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation