Previous PageTable Of Contents../index.htmlIndexNext Page

dx_playiottdata( )

Description | Cautions | Example | Errors | See Also

Name:

short dx_playiottdata(chdev, iottp, tptp, xpbp, mode)

Inputs:

int chdev

  valid Dialogic channel device handle

 

DX_IOTT *iottp

  pointer to I/O transfer table

 

DV_TPT *tptp

  pointer to termination parameter block

 

DX_XPB *xpbp

  pointer to I/O transfer parameter block

 

unsigned short mode

  play mode

Returns:

0 if success

 

-1 if failure

Includes:

srllib.h

 

dxxxlib.h

Category:

I/O function

Mode:

synchronous or asynchronous

Top Of PageDescription

The dx_playiottdata( ) function plays back recorded voice data from multiple sources on a channel. The file format for the files to be played is specified in the wFileFormat field of the DX_XPB. Other fields in the DX_XPB describe the data format. For files that include data format information (for example, WAVE files), these other fields are ignored.

Parameter

Description

chdev

channel device descriptor.

iottp

the voice data may come from any combination of data files, memory, or custom devices. The order of playback and the location of the voice data is specified in an array of DX_IOTT structures pointed to by iottp

tptp

pointer to Termination parameter table

xpbp

pointer to I/O transfer parameter block

 

specifies the record mode:

mode

PM_TONE
EV_SYNC
EV_ASYNC

play 200 ms audible tone
synchronous mode
asynchronous mode

Top Of PageCautions

  1. All files specified in the DX_IOTT table must be of the same file format type and match the file format indicated in DX_XPB.
  2. All files specified in the DX_IOTT table must contain data of the type described in DX_XPB.
  3. When playing or recording VOX files, the data format is specified in DX_XPB rather than through the mode argument of this function.
  4. The DX_IOTT data area must remain in scope for the duration of the function if running asynchronously.
  5. The DX_XPB data area must remain in scope for the duration of the function if running asynchronously.
  6. When set to play WAVE files, all other fields in the DX_XPB are ignored.
  7. When set to play WAVE files, this function will fail if an unsupported data format is attempted to be played. The supported data forms are:

Top Of PageExample

Top Of PageErrors

In asynchronous mode, function returns immediately and a TDX_PLAY event is queued upon completion. Check ATDX_TERMMSK( ) for the termination reason. If a failure occurs, then a TDX_ERROR event will be queued. Use ATDV_LASTERR( ) to determine the reason for error.

In synchronous mode, if this function returns -1 to indicate failure, one of the following reasons will be contained by ATDV_LASTERR( ):

Equate

Returned When

EDX_BUSY

Channel is busy

EDX_XPBPARM

Invalid DX_XPB setting

EDX_BADIOTT

Invalid DX_IOTT setting

EDX_SYSTEM

Error from operating system; use dx_fileerrno( ) to obtain error value. System I/O errors

EDX_BADWAVFILE

Invalid WAV file

EDX_SH_BADCMD

Unsupported command or WAV file format

Top Of PageSee Also


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2002, Dialogic Corporation
All rights reserved
This page generated February, 2002