Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 403
set conditions that adjust speed or volume of play — dx_setsvcond( )
!
!!
! Example
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
/*
* Global Variables
*/
DX_SVCB svcb[ 10 ] = {
/* BitMask AjustmentSize AsciiDigit DigitType */
{ SV_SPEEDTBL | SV_RELCURPOS, 1, '1', 0 }, /* 1 */
{ SV_SPEEDTBL | SV_ABSPOS, -4, '2', 0 }, /* 2 */
{ SV_VOLUMETBL | SV_ABSPOS, 1, '3', 0 }, /* 3 */
{ SV_SPEEDTBL | SV_ABSPOS, 1, '4', 0 }, /* 4 */
{ SV_SPEEDTBL | SV_ABSPOS, 1, '5', 0 }, /* 5 */
{ SV_VOLUMETBL | SV_ABSPOS, 1, '6', 0 }, /* 6 */
{ SV_SPEEDTBL | SV_RELCURPOS, -1, '7', 0 }, /* 7 */
{ SV_SPEEDTBL | SV_ABSPOS, 6, '8', 0 }, /* 8 */
{ SV_VOLUMETBL | SV_RELCURPOS, -1, '9', 0 }, /* 9 */
{ SV_SPEEDTBL | SV_ABSPOS, 10, '0', 0 }, /* 10 */ };
main()
{
int dxxxdev;
/*
* Open the Voice Channel Device and Enable a Handler
*/
if ( ( dxxxdev = dx_open( "dxxxB1C1", NULL) ) == -1 ) {
perror( "dxxxB1C1" );
exit( 1 );
}
/*
* Set Speed and Volume Adjustment Conditions
*/
if (
dx_setsvcond( dxxxdev, 10, svcb )
== -1 ) {
printf( "Unable to Set Speed and Volume" );
printf( " Adjustment Conditions\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 );
}