
Description | Cautions | Example | Errors | See Also
Name: |
int dx_getsvmt(chdev,tabletype,svmtp ) | |
Inputs: |
int chdev |
|
unsigned short tabletype |
| |
DX_SVMT * svmtp |
| |
Returns: |
0 if success | |
-1 if failure | ||
Includes: |
srllib.h | |
dxxxlib.h | ||
Category: |
Speed and Volume | |
The dx_getsvmt( ) function returns the current Speed or Volume Modification Table to the DX_SVMT structure.
For more information on the Speed and Volume Modification Tables, refer to the DX_SVMT structure in the chapter on Data Structures, and see also the Voice Software Reference: Voice Features Guide.
Parameter |
Description | |
chdev |
specifies the valid channel device handle obtained by a call to dx_open( ). | |
tabletype |
specifies whether to retrieve the Speed or the Volume Modification Table. | |
SV_SPEEDTBL |
Retrieve the Speed Modification Table values | |
SV_VOLUMETBL |
Retrieve the Volume Modification Table values | |
svmtp |
points to the DX_SVMT structure that contains the Speed/Volume Modification Table entries. | |
None.
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
/*
* Global Variables
*/
main()
{
DX_SVMT svmt;
int dxxxdev, index;
/*
* Open the Voice Channel Device and Enable a Handler
*/
if ( ( dxxxdev = dx_open( "dxxxB1C1", NULL) ) == -1 ) {
perror( "dxxxB1C1" );
exit( 1 );
}
/*
* Get the Current Volume Modification Table
*/
memset( &svmt, 0, sizeof( DX_SVMT ) );
if (dx_getsvmt( dxxxdev, SV_VOLUMETBL, &svmt ) == -1 ){
printf( "Unable to Get the Current Volume" );
printf( " Modification Table\n" );
printf( "Lasterror = %d Err Msg = %s\n",
ATDV_LASTERR( dxxxdev ), ATDV_ERRMSGP( dxxxdev ) );
dx_close( dxxxdev );
exit( 1 );
} else {
printf( "Volume Modification Table is:\n" );
for ( index = 0; index < 10; index++ ) {
printf( "decrease[ %d ] = %d\n", index,
svmt.decrease[ index ] );
}
printf( "origin = %d\n", svmt.origin );
for ( index = 0; index < 10; index++ ) {
printf( "increase[ %d ] = %d\n", index,
svmt.increase[ index ] );
}
}
/*
* Continue Processing
* .
* .
* .
*/
/*
* Close the opened Voice Channel Device
*/
if ( dx_close( dxxxdev ) != 0 ) {
perror( "close" );
}
/* Terminate the Program */
exit( 0 );
}
If this function returns -1 to indicate failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following error reasons:
|
EDX_BADPARM |
|
EDX_BADPROD |
|
EDX_SPDVOL |
|
EDX_SYSTEM |
|
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation