Intel 05-1832-002 IP Phone User Manual


 
250 Voice API for Windows Operating Systems Library Reference — November 2003
dx_getsvmt( ) — return the current speed or volume modification table
EDX_SPDVOL
Must specify either SV_SPEEDTBL or SV_VOLUMETBL
EDX_SYSTEM
Error from operating system; use dx_fileerrno( ) to obtain error value
!
!!
! 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 );
}
/*
* 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
* .
* .
* .
*/