
Description | Cautions | Example | Errors | See Also
|
Name: |
int dx_setchxfercnt(chdev, bufnum, bufsize_identifier) |
|
|
Inputs: |
int chdev int bufsize_identifier |
|
|
Returns: |
0 to indicate successful completion |
|
| -1 if failure | ||
|
Includes: |
srllib.h |
|
| dxxxlib.h | ||
|
Mode: |
Synchronous |
|
The dx_setchxfercnt( ) function sets the bulk queue buffer size for the channel. This function can change the size of the buffer used to transfer voice data between a user application and the Dialogic hardware. The dx_setchxfercnt(int chDev, int bufnum) allows a smaller driver data transfer buffer size. The minimum buffer size is now 1.5KB.
The largest available buffer size is 8K, which is the default. In general, this function is used in conjunction with the User I/O feature; for more information, see the dx_setuio function. This function sets up the frequency with which the application-registered read or write functions are called by the voice dll. For applications requiring more frequent access to voice data in smaller chunks, you can use this function on a per channel basis to lower the buffer size.
Parameter |
Description | |
chdev |
Specifies the valid device handle obtained when the device was opened using xx_open( ), where "xx" is the prefix identifying the device to be opened. | |
bufsize_identifier |
Specifies the bulk queue buffer size for the channel. Use one of the following values: | |
|
1 |
Sets the buffer size to 8K (default). |
|
0 |
Sets the buffer size to 4K. |
|
4 |
Sets the buffer size to 2K. |
|
6 |
Sets the buffer size to 1.5K. |
Equates for these values are not available as #define in any header file.
#include <windows.h>
#include "srllib.h"
#include "dxxxlib.h"
int dev; /* Dialogic device handle */
/* Open board 1 channel 1 device */
if ((dev = dx_open("dxxxB1C1", 0)) == -1) {
/* Perform system error processing */
exit(1);
}
/* Set the bulk data transfer buffer size to 1.5 kilobytes
*/
if (dx_setchxfercnt(dev, 6) == -1) {
printf("Error message = %s", ATDV_ERRMSGP(dev));
exit(1);
}
If the function returns -1 to indicate failure, use the SRL Standard Attribute function ATDV_LASTERR( ) to obtain the error code or ATDV_ERRMSGP( ) to obtain a descriptive error message. The error codes returned by ATDV_LASTERR( ) are:
EDX_ BADPARM |
Invalid parameter |
EDX_SYSTEM |
Error from operating system; use dx_fileerrno( ) to obtain error value |
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation