(Page 26 of 41 in this chapter) Version
typedef struct
{
DWORD size;
DWORD DTMFabort;
INT32 gain;
DWORD speed;
DWORD maxspeed;
} VCE_PLAY_PARMS;
/* Play digit string from prompt file */
/*
* This routine starts speaking a digit string.
* The spoken digits "oh" through "nine" are in 10 messages in
* DIGITS.VOX where msg 0 = "oh", msg 1 = "one", etc.
*/
extern CTAHD CtaHd;
extern CTAQUEUEHD CtaQueueHd;
void mySpeakDigits (char *digits)
{
unsigned msglist[50];
unsigned count;
VCEHD vh;
CTA_EVENT event;
vceOpenFile (Ctahd, "DIGITS.VOX", 0, VCE_PLAY_ONLY, 0, &vh) ;
for (count = 0;
*digits != '\0' && count < sizeof msglist/sizeof msglist[0];
digits++)
{
if (isdigit(*digits))
msglist[count++] = *digits - '0' ;
}
vcePlayList(vh, msglist, count, NULL);
do
{
ctaWaitEvent( CtaQueueHd, &event, CTA_WAIT_FOREVER);
} while (event.id != VCEEVN_PLAY_DONE); /* Ignore other events */
vceClose(vh);
}
(Page 26 of 41 in this chapter) Version