
Description | Cautions | Example | Errors | See Also
Name: |
int dx_getcursv(chdev,curvolp,curspeedp) | |
Inputs: |
int chdev |
|
int * curvolp |
| |
int * curspeedp |
| |
Returns: |
0 if success | |
-1 if failure | ||
Includes: |
srllib.h | |
dxxxlib.h | ||
Category: |
Speed and Volume | |
The dx_getcursv( ) function returns the specified current speed and volume settings on a channel. For example, use dx_getcursv( ) to determine the speed and volume level set interactively by a listener using DTMF digits during a play. (DTMF digits are set as play adjustment conditions using the dx_setsvcond( ) function, or by one of the convenience functions dx_addspddig( ) and dx_addvoldig( ))
Parameter |
Description |
chdev |
specifies the valid channel device handle obtained by a call to dx_open( ). |
curvolp |
points to an integer that represents the current absolute volume setting for the channel. This value will lie between -30dB and +10dB. |
curspeedp |
points to an integer that represents the current absolute speed setting for the channel. This value will be between -50% and +50%. |
None.
#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
* .
* .
* .
*/
/*
* Close the opened Voice Channel Device
*/
if ( dx_close( dxxxdev ) != 0 ) {
perror( "close" );
}
/* Terminate the Program */
exit( 0 );
}
If this function returns -1 to indicate failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following error reasons:
|
EDX_BADPARM |
|
EDX_BADPROD |
|
EDX_SYSTEM |
|
Related to Speed and Volume:
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation