Intel 05-1832-002 IP Phone User Manual


 
302 Voice API for Windows Operating Systems Library Reference — November 2003
dx_play( ) — play recorded voice data
After dx_play( ) terminates, the current channel’s status information, including the reason for
termination, can be accessed using extended attribute functions. Use the ATDX_TERMMSK( )
function to determine the reason for termination.
Note: The DX_IOTT structure must remain in scope for the duration of the function if running
asynchronously.
!
!!
! Synchronous Operation
By default, this function runs synchronously, and returns a 0 to indicate that it has completed
successfully.
Termination conditions for play are set using the DV_TPT structure. Play continues until all data
specified in DX_IOTT has been played, or until one of the conditions specified in DV_TPT is
satisfied.
Termination of synchronous play is indicated by a return value of 0. After dx_play( ) terminates,
use the ATDX_TERMMSK( ) function to determine the reason for termination.
!
!!
! Cautions
Whenever dx_play( ) is called, its speed and volume is based on the most recent adjustment
made using dx_adjsv( ) or dx_setsvcond( ).
Intel® telecom boards enable you to select either A-law or mu-law encoding of data. The
default on the board is set to mu-law and returns to mu-law after each play. The A-law
parameters must be passed each time the play function is called.
!
!!
! Errors
If the function returns -1, use the Standard Runtime Library (SRL) Standard Attribute function
ATDV_LASTERR( ) to obtain the error code or use ATDV_ERRMSGP( ) to obtain a descriptive
error message. One of the following error codes may be returned:
EDX_BADPARM
Invalid parameter
EDX_BADIOTT
Invalid DX_IOTT entry
EDX_BADTPT
Invalid DV_TPT entry
EDX_BUSY
Busy executing I/O function
EDX_SYSTEM
Error from operating system; use dx_fileerrno( ) to obtain error value
!
!!
! Example 1
This example illustrates how to use dx_play( ) in synchronous mode.