Previous PageTable Of Contents../index.htmlIndexNext Page

dx_playwav( )

Description | Cautions | Example | Errors | See Also

Name:

SHORT dx_playwav(chdev, filenamep, tptp, mode)

Inputs:

int chdev

  valid Dialogic channel device handle

 

char *filenamep

  pointer to name of file to play

 

DV_TPT *tptp

  pointer to termination parameter block

 

unsigned short mode

  play mode

Returns:

  0 if successful

 

  -1 if failure

Includes:

  srllib.h

 

  dxxxlib.h

Category:

Convenience function

Mode:

synchronous

Top Of PageDescription

The dx_playwav( ) convenience function plays voice data stored in a single WAVE file. This function calls dx_playiottdata( ).

The function does not specify a DX_XPB structure because the WAVE file contains the necessary format information.

Parameter

Description

chdev

Channel device descriptor

tcbp

Pointer to termination parameter table

filenamep

Pointer to name of file to play

mode

specifies the play mode:

PM_TONE play 200 ms audible tone
EV_SYNC synchronous operation
(must be specified)

NOTE:
Both PM_TONE and EV_SYNC can be specified by ORing the two values.

Top Of PageCautions

This function fails when an unsupported data waveform attempts to play. The supported waveforms are:

Top Of PageExample

Top Of PageErrors

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