Intel 05-1832-002 IP Phone User Manual


 
122 Voice API for Windows Operating Systems Library Reference — November 2003
dx_addspddig( ) — set a DTMF digit to adjust speed
!
!!
! 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_SVADJBLK
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 - increase the
* playback speed by 30% whenever DTMF key 1 is pressed.
*/
if (
dx_addspddig( dxxxdev, '1', SV_ADD30PCT )
== -1 ) {
printf("Unable to Add a Speed Adjustment Condition\n");
printf( "Lasterror = %d Err Msg = %s\n",
ATDV_LASTERR( dxxxdev ), ATDV_ERRMSGP( dxxxdev ) );
dx_close( dxxxdev );
exit( 1 );
}
/*
* Continue Processing
* .
* .
* .
*/