Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 131
set a DTMF digit to adjust volume — dx_addvoldig( )
EDX_SVADJBLKS
Invalid number of play adjustment blocks
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()
{
int dxxxdev;
/*
* Open the Voice Channel Device and Enable a Handler
*/
if ( ( dxxxdev = dx_open( "dxxxB1C1", NULL) ) == -1 ) {
perror( "dxxxB1C1" );
exit( 1 );
}
/*
* Add a Speed Adjustment Condition - decrease the
* playback volume by 2dB whenever DTMF key 2 is pressed. */
if (
dx_addvoldig( dxxxdev, '2', SV_SUB2DB )
== -1 ) {
printf( "Unable to Add a Volume Adjustment" );
printf( " Condition\n");
printf( "Lasterror = %d Err Msg = %s\n",
ATDV_LASTERR( dxxxdev ), ATDV_ERRMSGP( dxxxdev ) );
dx_close( dxxxdev );
exit( 1 );
}
/*
* Continue Processing
* .
* .
* .
*/
/*
* Close the opened Voice Channel Device
*/
if ( dx_close( dxxxdev ) != 0 ) {
perror( "close" );
}
/* Terminate the Program */
exit( 0 );
}
!
!!
! See Also
dx_addspddig( )
dx_adjsv( )
dx_clrsvcond( )