356 Voice API for Windows Operating Systems Library Reference — November 2003
dx_recwav( ) — record voice data to a single WAVE file
/* 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);
}
/* Start playback */
if (dx_playwav(chdev,"HELLO.WAV",&tpt,EV_SYNC) == -1) {
printf("Error playing file - %s\n", ATDV_ERRMSGP(chdev));
exit(4);
}
/* clear digit buffer */
dx_clrdigbuf(chdev);
/* Start 11 kHz PCM recording */
if (dx_recwav(chdev,"MESSAGE.WAV", &tpt, (DX_XPB *)NULL,PM_TONE|EV_SYNC) == -1) {
printf("Error recording file - %s\n", ATDV_ERRMSGP(chdev));
exit(4);
}
}
!
!!
!See Also
dx_reciottdata( )
dx_recvox( )