Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 309
synchronously play voice data — dx_playf( )
rval = dx_play(devd,&iott,tptp,mode);
if (close(iott.io_fhandle) == -1) {
return -1;
}
return rval;
}
!
!!
! Example
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
main()
{
int chdev;
DV_TPT tpt[2];
/* Open the channel using dx_open( ). Get channel device descriptor in
* chdev.
*/
if ((chdev = dx_open("dxxxB1C1",NULL)) == -1) {
/* process error */
}
/* Set up the DV_TPT structures for MAXDTMF. Play until one digit is
* pressed or the file has completed play
*/
dx_clrtpt(tpt,1);
tpt[0].tp_type = IO_EOT; /* only entry in the table */
tpt[0].tp_termno = DX_MAXDTMF; /* Maximum digits */
tpt[0].tp_length = 1; /* terminate on the first digit */
tpt[0].tp_flags = TF_MAXDTMF; /* Use the default flags */
if
(dx_playf(chdev,"weather.vox",tpt,EV_SYNC) ==
-1) {
/* process error */
}
.
.
}
!
!!
! See Also
dx_play( )
dx_playiottdata( )
dx_playvox( )
dx_setparm( ), dx_getparm( )
dx_adjsv( ) (for speed or volume control)
dx_setsvcond( ) (for speed or volume control)
ATDX_TERMMSK( )
DV_TPT data structure (to specify a termination condition)