Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 407
change default values of the speed or volume modification table — dx_setsvmt( )
!
!!
! Example
#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 );
}
/*
* Set up the Speed/Volume Modification
*/
memset( &svmt, 0, sizeof( DX_SVMT ) );
svmt.decrease[ 0 ] = -128;
svmt.decrease[ 1 ] = -128;
svmt.decrease[ 2 ] = -128;
svmt.decrease[ 3 ] = -128;
svmt.decrease[ 4 ] = -128;
svmt.decrease[ 5 ] = -20;
svmt.decrease[ 6 ] = -16;
svmt.decrease[ 7 ] = -12;
svmt.decrease[ 8 ] = -8;
svmt.decrease[ 9 ] = -4;
svmt.origin = 0;
svmt.increase[ 0 ] = 4;
svmt.increase[ 1 ] = 8;
svmt.increase[ 2 ] = 10;
svmt.increase[ 3 ] = -128;
svmt.increase[ 4 ] = -128;
svmt.increase[ 5 ] = -128;
svmt.increase[ 6 ] = -128;
svmt.increase[ 7 ] = -128;
svmt.increase[ 8 ] = -128;
svmt.increase[ 9 ] = -128;
/*
* Update the Volume Modification Table without Wrap Mode.
*/
if (
dx_setsvmt( dxxxdev, SV_VOLUMETBL, &svmt, 0 )
== -1){
printf( "Unable to Set the Volume Modification Table\n" );
printf( "Lasterror = %d Err Msg = %s\n",
ATDV_LASTERR( dxxxdev ), ATDV_ERRMSGP( dxxxdev ) );
dx_close( dxxxdev );
exit( 1 );
}
/*
* Continue Processing
* .
* .
*/