Intel 05-1832-002 IP Phone User Manual


 
344 Voice API for Windows Operating Systems Library Reference — November 2003
dx_recf( ) — record voice data to a single file
!
!!
! 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_BADIOTT
Invalid DX_IOTT entry
EDX_BADPARM
Invalid parameter
EDX_BADTPT
Invalid DX_TPT entry
EDX_BUSY
Busy executing I/O function
EDX_SYSTEM
Error from operating system; use dx_fileerrno( ) to obtain error value
!
!!
! Source Code
/***************************************************************************
* NAME: int dx_recf(devd,filep,tptp,mode)
* DESCRIPTION: Record data to a file
* INPUTS: devd - channel descriptor
* tptp - TPT pointer
* filep - ASCIIZ string for name of file to read into
* mode - tone initiation flag
* OUTPUTS: Data stored in file, status in CSB pointed to by csbp
* RETURNS: 0 or -1 on error
* CALLS: open() dx_rec() close()
* CAUTIONS: none.
****************************************************************************
*/
int dx_recf(devd,filep,tptp,mode)
int devd;
char *filep;
DV_TPT *tptp;
USHORT mode;
{
int rval;
DX_IOTT iott;
/*
* If Async then return Error
* Reason: IOTT's must be in scope for the duration of the record
*/
if ( mode & EV_ASYNC ) {
return( -1 );
}
/* Open the File */
if ((iott.io_fhandle = open(filep,(O_WRONLY|O_CREAT|O_TRUNC),0666)) == -
1) {
return -1;
}