Intel 05-1832-002 User Manual
354
Voice API for Windows Operating Systems Library Reference — November 2003
dx_recwav( ) — record voice data to a single WAVE file
dx_recwav( )
record voice data to a single WAVE file
!
!
!
! Description
The dx_recwav( ) convenience function records voice data to a single WAVE file. This function in
turn calls
turn calls
Name:
SHORT dx_recwav(chdev, filenamep, tptp, xpbp, mode)
Inputs:
int chdev
•
valid channel device handle
char *filenamep
•
pointer to name of file to record to
DV_TPT *tptp
•
pointer to Termination Parameter Table structure
DX_XPB *xpbp
•
pointer to I/O Transfer Parameter Block
unsigned short mode
•
record mode
Returns:
0 if successful
-1 if failure
-1 if failure
Includes:
srllib.h
dxxxlib.h
dxxxlib.h
Category:
I/O Convenience
Mode:
synchronous
Platform:
DM3, Springware
Parameter
Description
chdev
specifies the valid channel device handle obtained when the channel was
opened using
opened using
tptp
points to the Termination Parameter Table structure, DV_TPT, which specifies
termination conditions for playing. For more information on this function, see
termination conditions for playing. For more information on this function, see
filenamep
points to the name of the file to record to
xpbp
points to the I/O Transfer Parameter Block, DX_XPB, which specifies the file
format, data format, sampling rate, and resolution. For more information on
this structure, see
format, data format, sampling rate, and resolution. For more information on
this structure, see
Note: If xpbp is set to NULL, the function will record in 11 kHz linear 8-bit
PCM.
mode
specifies the play mode. The following two symbolic values may be used
individually or ORed together:
individually or ORed together:
•
EV_SYNC – synchronous operation (must be specified)
•
PM_TONE – play 200 msec audible tone