ec_getparm( )
Cautions | Example | Errors | See Also
Description
The ec_getparm( ) function returns the current parameter settings for an open device that supports Continuous Speech Processing (CSP).
The same parameter IDs are available for ec_setparm( ) and ec_getparm( ). For details on these parameters, see the ec_setparm( ) function description.
Cautions
- The address of the variable passed to receive the value of the requested parameter must be cast as void* as shown in the example. You must also clear this variable prior to calling ec_getparm( ).
- Allocate sufficient memory to receive the value of the parameter specified. Note that some parameters require only 2 bytes while other parameters may be ASCII strings.
Example
#include <windows.h> /* include in Windows applications only; exclude in Linux */ #include <stdio.h> #include <srllib.h> #include <dxxxlib.h> #include <eclib.h> #include <errno.h> /* include in Linux applications only; exclude in Windows */ main() { int chdev, parmval; int srlmode; /* Standard Runtime Library mode */ /* Set SRL to run in polled mode. */ srlmode = SR_POLLMODE; if (sr_setparm(SRL_DEVICE, SR_MODEID, (void *)&srlmode) == -1) { /* process error */ } /* Open the board and get channel device handle in chdev */ if ((chdev = dx_open("dxxxB1C1",0)) == -1) { /* process error */ } /* Clear parameter variable */ parmval = 0; /* Get parameter settings */ if (ec_getparm(chdev, DXCH_BARGEIN, (void *)&parmval) == -1) { /* process error */ } /* Get additional parameter settings as needed */ . . . }Errors
If the function returns -1, use ATDV_LASTERR( ) to return the error code and ATDV_ERRMSGP( ) to return a descriptive error message.
One of the following error codes may be returned:
See Also
- ec_setparm( )
- dx_setparm( )
Click here to contact Dialogic Customer Engineering
Copyright 2001, Intel Corporation