350 Voice API for Windows Operating Systems Library Reference — November 2003
dx_reciottdata( ) — record voice data to multiple destinations
/*
* Specify VOX file format for PCM at 8KHz.
*/
xpb.wFileFormat = FILE_FORMAT_VOX;
xpb.wDataFormat = DATA_FORMAT_PCM;
xpb.nSamplesPerSec = DRT_8KHZ;
xpb.wBitsPerSample = 8;
/* Wait forever for phone to ring and go offhook */
if (dx_wtring(chdev,1,DX_OFFHOOK,-1) == -1) {
printf("Error waiting for ring - %s\n", ATDV_LASTERR(chdev));
exit(3);
}
/* Play intro message */
if (dx_playwav(chdev,"HELLO.WAV",&tpt,EV_SYNC) == -1) {
printf("Error playing file - %s\n", ATDV_ERRMSGP(chdev));
exit(4);
}
/* Start recording */
if (
dx_reciottdata(chdev,&iott,&tpt,&xpb,PM_TONE|EV_SYNC) == -1)
{
printf("Error recording file - %s\n", ATDV_ERRMSGP(chdev));
exit(4);
}
}
!
!!
!See Also
dx_rec( )
dx_recf( )
dx_recvox( )
dx_recwav( )
dx_setuio( )