Intel 05-1832-002 IP Phone User Manual


 
224 Voice API for Windows Operating Systems Library Reference — November 2003
dx_getcursv( ) — return the specified current speed and volume settings
!
!!
! Errors
If the function returns -1, use the Standard Runtime Library (SRL) Standard Attribute function
ATDV_LASTERR( ) to obtain the error code or use ATDV_ERRMSGP( ) to obtain a descriptive
error message. One of the following error codes may be returned:
EDX_BADPARM
Invalid parameter
EDX_BADPROD
Function not supported on this board
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;
int curspeed, curvolume;
/*
* Open the Voice Channel Device and Enable a Handler
*/
if ( ( dxxxdev = dx_open( "dxxxB1C1", NULL) ) == -1 ) {
perror( "dxxxB1C1" );
exit( 1 );
}
/*
* Get the Current Volume and Speed Settings
*/
if (
dx_getcursv( dxxxdev, &curvolume, &curspeed )
== -1 ) {
printf( "Unable to Get the Current Speed and" );
printf( " Volume Settings\n");
printf( "Lasterror = %d Err Msg = %s\n",
ATDV_LASTERR( dxxxdev ), ATDV_ERRMSGP( dxxxdev ) );
dx_close( dxxxdev );
exit( 1 );
} else {
printf( "Volume = %d Speed = %d\n", curvolume, curspeed );
}
/*
* Continue Processing
* .
* .
* .
*/